Creating applications with RoR on OS X
- Download Locomotive and install it by opening the image file and dragging the application to your Applications folder.
- Run Locomotive and click the + button in the control bar. Select "Create New" from the button's menu.
- Give your application a name and select the directory (folder) that Locomotive should create it in.
- Press the Create button
That's it, you've created your first rails application!
To run the server for your application, select the application's name in the applications list in Locomotive and press the Run button. Now go to http://localhost:Port (where port is the port that is listed next to the application's name in Locomotive) and you will see the default Rails welcome screen.
One caveat: If you're using MYSQL via MAMP, you need to add the following line "socket: /Applications/MAMP/tmp/mysql/mysql.sock" to your database configuration file (config/database.yml) when working with RoR. That one caught me out until I found the note in Locomotive's help files.
To learn more about rails, check out the tutorials on the Ruby on Rails web site.
So how does this all apply to Flex/Flash development? Well, MidnightCoders has a Flash Remoting solution for Ruby on Rails called WebORB for Ruby on Rails that supports both AMF0 and AMF3...
The Creating applications with RoR on OS X article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

axelator
i have appended the MAMP socket code, but still get an error on rake:
Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
wondering what i am doing wrong…
October 27th, 2006 at 9:01 pmaxelator
I found the answwer here:
http://forum.refreshorlando.org/read.php?13,180,186http://forum.refreshorlando.org/read.php?13,180,186
Basically what the Locomotive Help doc won’t tell you is you have to add the string “socket: /Applications/MAMP/tmp/mysql/mysql.sock” to the config/database.yml file like so:
development:
adapter: mysql
database: myapp_development
username: root
password:
host: localhost
socket: /Applications/MAMP/tmp/mysql/mysql.sock
THEN, Locomotive and MAMP know how to play nice together for the rake!
Thanks!
October 27th, 2006 at 9:07 pmaral
Thanks for updating us — much appreciated!
October 29th, 2006 at 9:29 pmDamianT
Mate - thanks for the tip about using MAMP - adding socket: /Applications/MAMP/tmp/mysql/mysql.sock
June 12th, 2007 at 4:31 pmMuch appreciated!!
JamesP
So would that mean I would have to do the same if I am using WAMP?
Thanks for the time and efforts?
November 12th, 2008 at 10:02 pm