Yehuda Katz is a member of the Ember.js, Ruby on Rails and jQuery Core Teams; he spends his daytime hours at the startup he founded, Tilde Inc.. Yehuda is co-author of best-selling jQuery in Action and Rails 3 in Action. He spends most of his time hacking on open source—his main projects, like Thor, Handlebars and Janus—or traveling the world doing evangelism work. He can be found on Twitter as @wycats and on Github.
My Preferred Rails Development Environment
January 27th, 2007
I’ve been chatting with a bunch of new Rails guys lately, and have been recommending my particular mix of Eclipse, RDT, RadRails, Subclipse, and Aptana as a basic IDE for new guys.
It occurred to me that there’s no one-stop shop for instructions on how to do that, so here goes.
- Download Eclipse
- You will need to download the version for your particular environment (Win32, OSX, Linux)
- Extract the zip file you downloaded into someplace you use for program files
- Run Eclipse
- You will now need to install some plugins
- In Eclipse, go to Help->Updates->Find and Install
- Select “Search for new features to install” and click Next
- Click “New Remote Site” and add each of the following plugins:
- Eclipse plugins use “update sites,” which provide all of the information for updates to the software after initial installation.
- RadRails: http://radrails.sourceforge.net/update
- RDT: http://updatesite.rubypeople.org/release
- SubClipse: http://subclipse.tigris.org/update_1.0.x
- Aptana: http://update.aptana.com/install/
- Make sure all of the new items are selected, and click “Finish”
- Some updates will come up. Select them all and click “Next”
- Several Licensing questions may come up. Accept the terms of the licensing agreements and click “Next”
- A list of features to be installed will appear. Click “Finish”
- Eclipse will download all of the features and install them. It will then ask you to verify any features that have not been “signed.” Accept all features.
- When Eclipse is done installing, it will ask you to restart Eclipse. Do so.
- Congrats. You are done.
- You may need to do some additional configuration.
- Go to Window->Preferences
- Go to General->Editors->File Associations
- Make sure the default editor for “htm” and “html” is “Aptana HTML Editor”
- Make sure the default editor for “js” is “Aptana JS Editor”
- Make sure the default editor for “css” is “Aptana CSS Editor”
- Make sure the default editor for “rb” is “Ruby Editor”
- Make sure the default editor for “rhtml” is “RHTML Editor”
- Make sure the default editor for “yml” is “YML Editor”
- Go to Ruby->Installed Interpreters
- Make sure there is an entry there.
- If not, click “Add” and find your ruby binary (it might be in /local/bin or /opt/local/bin)
- NOTE: It does not matter what name you give this. You just need to point it to the binary.
- Go to Ruby->Ri/rdoc
- If either of the two is missing, add the binary (in Windows, it might be a .bat file)
- Go to Rails->Configuration
- Make sure Rails and Rake both have entries. Otherwise, add them (the ones in the main bin directory may not work. I needed to use /opt/local/lib/ruby/gems/1.8/gems/rails-1.1.6/bin/rails, for instance). If you go this route, make sure to change the path to your binaries if you upgrade.
- If you plan to use Mongrel with the built-in IDE, make sure there’s an entry in the Mongrel path.
- Go to General->Editors->Text Editors and set your desired tab width
- Go to Ruby->Formatter.
- Click “Show” next to Eclipse [built-in]
- Select your desired tab policy
- Click Ok and select a new name for your formatting settings.
- Click Ok.
- Click Rails->Editors->RHTML Editor
- Choose your desired tab settings
- Go to Aptana->Editors
- Choose your desired tab settings under “Formatting”
- Your basic settings should now work.
I know the above sounds like a lot of work, but it’s not. Besides, most of the settings are good from the beginning. If you choose to go this route (and I hope you will), make sure to install Dr. Nic’s RadRails Templates, which make all of the pretty TextMate shortcuts (warning: PDF) work in Eclipse.
Update: Digg it!