Yehuda Katz is a member of the Ember.js, Ruby on Rails and jQuery Core Teams; his 9-to-5 home is at the startup he founded, Tilde Inc.. There he works on Skylight, the smart profiler for Rails, and does Ember.js consulting. He is best known for his open source work, which also includes Thor and Handlebars. He travels the world doing open source evangelism and web standards work.

My Preferred Rails Development Environment

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.

  1. Download Eclipse
    1. You will need to download the version for your particular environment (Win32, OSX, Linux)
    2. Extract the zip file you downloaded into someplace you use for program files
    3. Run Eclipse
  2. You will now need to install some plugins
    1. In Eclipse, go to Help->Updates->Find and Install
    2. Select “Search for new features to install” and click Next
    3. Click “New Remote Site” and add each of the following plugins:
      1. Eclipse plugins use “update sites,” which provide all of the information for updates to the software after initial installation.
      2. RadRails: http://radrails.sourceforge.net/update
      3. RDT: http://updatesite.rubypeople.org/release
      4. SubClipse: http://subclipse.tigris.org/update_1.0.x
      5. Aptana: http://update.aptana.com/install/
    4. Make sure all of the new items are selected, and click “Finish”
    5. Some updates will come up. Select them all and click “Next”
    6. Several Licensing questions may come up. Accept the terms of the licensing agreements and click “Next”
    7. A list of features to be installed will appear. Click “Finish”
    8. 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.
    9. When Eclipse is done installing, it will ask you to restart Eclipse. Do so.
    10. Congrats. You are done.
  3. You may need to do some additional configuration.
    1. Go to Window->Preferences
    2. Go to General->Editors->File Associations
      1. Make sure the default editor for “htm” and “html” is “Aptana HTML Editor”
      2. Make sure the default editor for “js” is “Aptana JS Editor”
      3. Make sure the default editor for “css” is “Aptana CSS Editor”
      4. Make sure the default editor for “rb” is “Ruby Editor”
      5. Make sure the default editor for “rhtml” is “RHTML Editor”
      6. Make sure the default editor for “yml” is “YML Editor”
    3. Go to Ruby->Installed Interpreters
      1. Make sure there is an entry there.
      2. If not, click “Add” and find your ruby binary (it might be in /local/bin or /opt/local/bin)
      3. NOTE: It does not matter what name you give this. You just need to point it to the binary.
    4. Go to Ruby->Ri/rdoc
      1. If either of the two is missing, add the binary (in Windows, it might be a .bat file)
    5. Go to Rails->Configuration
      1. 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.
      2. If you plan to use Mongrel with the built-in IDE, make sure there’s an entry in the Mongrel path.
    6. Go to General->Editors->Text Editors and set your desired tab width
    7. Go to Ruby->Formatter.
      1. Click “Show” next to Eclipse [built-in]
      2. Select your desired tab policy
      3. Click Ok and select a new name for your formatting settings.
      4. Click Ok.
    8. Click Rails->Editors->RHTML Editor
      1. Choose your desired tab settings
    9. Go to Aptana->Editors
      1. Choose your desired tab settings under “Formatting”
  4. 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.

Happy Hacking!

Update: Digg it!

14 Responses to “My Preferred Rails Development Environment”

Thanks a lot for sharing this information/experience which will save me and I am sure many others loads of time & hassle.

Thanks,
Saw this on dzone and it has been great.

As this is now my fifth time following this article for myself or someone else – just wanted to say thanks!

thanks just installed it now

btw any 64bit (impatient) users go with the 32bit version it saves so much time

This is still a very useful article.

Thanks!

BTW – the lastest subclipse install url (URL: http://subclipse.tigris.org/update_1.4.x) is mentioned here: http://subclipse.tigris.org/install.html

Currently, you’ll want to update the aptana studio url too: http://update.aptana.com/update/studio/3.4

That installs an Aptana Installer which opens a dialog similar to the built in Software Updates installer, but only for Aptana component. I installed everything but Aptana Professional. I installed Aptana Pro on a Windows system and when I chose not to pay, many of the Aptana features stopped working.

Hey, Yehuda… I’m confused. In this blog you say that eclipse is your preferred Rails IDE, but you seem to be a heavy user of TextMate… What tools do you use now do your magic?

Aptana just released Studio 1.5, and the plug-in site has changed to: http://update.aptana.com/update/studio. You can also access plug-in information on our wiki at: http://www.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration. Thank you!

I downloaded the latest version of Eclipse. It looks about the same as it has ever been in the Help>Check for Updates. I realize this post is old but I have experience with Eclipse. But the poor newcommer is probably going hugh? Where is that? So for their sake do updates first for any new installs of Eclipse. Then add the new software plugins via Help>Install New Software. Click add button on right side of work with box. A dialog opens and asks for the name and URL. It’s like this in the blog here
name: url:
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/

hope this helps
Thanks Mr. Katz for a very good article. It’s over six years old and still accurate for most experienced Eclipse users.

Ruby is now under DLTK: http://download.eclipse.org/technology/dltk/updates

Leave a Reply

Archives

Categories

Meta