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
- 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/
- 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"
- 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.
- If either of the two is missing, add the binary (in Windows, it might be a .bat file)
- 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.
- 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.
- Choose your desired tab settings
- Choose your desired tab settings under "Formatting"
- Your basic settings should now work.
<li>You will now need to install some plugins</li>
<li>Make sure all of the new items are selected, and click "Finish"</li> <li>Some updates will come up. Select them all and click "Next"</li> <li>Several Licensing questions may come up. Accept the terms of the licensing agreements and click "Next"</li> <li>A list of features to be installed will appear. Click "Finish"</li> <li>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.</li> <li>When Eclipse is done installing, it will ask you to restart Eclipse. Do so.</li> <li>Congrats. You are done.</li>
<li>Go to Ruby->Installed Interpreters</li>
<li>Go to Ruby->Ri/rdoc</li>
<li>Go to Rails->Configuration</li>
<li>Go to General->Editors->Text Editors and set your desired tab width</li> <li>Go to Ruby->Formatter.</li>
<li>Click Rails->Editors->RHTML Editor</li>
<li>Go to Aptana->Editors</li>
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!