Installing Rails on Eclipse with Aptana + RadRails plugins

Since I run on a 64-bit architecture, I couldn’t use Aptana Studio (it doesn’t support 64-bit yet). I had to install Aptana as a plugin in Eclipse. Fairly easy, if you do not install Rails with Ubuntu’s packaging system, but with RubyGems’, as explained on RoR’s blog, and if you follow those easy steps.

However, when I tried to create a new Rails project in Eclipse, I kept on having this error:

[path]/1.8/rubygems.rb:204:in `report_activate_error':5 Could not find RubyGem rails (> 0) (Gem::LoadError)

That was because Eclipse was using its default Ruby interpreter (some JRuby interpreter coming with Eclipse installation), and not the one I had installed on my machine. You’ll need to go through the menu [Windows -> Preferences -> Installed Ruby interpreters], and set your Ruby installation directory.

I got confused at first, because it complained about Rails (having me tinkering with my Rails installation) whereas the problem was with Ruby (Eclipse was targeting the wrong Ruby installation).

Advertisements

Got a comment?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: