Written by Sean Behan on Sun Jun 17th 2012

After installing Ruby Enterprise Edition, REE, and Passenger on Ubuntu you may see this error message when you run script/console for the first time

./script/console production
# => 
Loading production environment (Rails 2.3.5)
Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org
You then scratch your head and run
which gem
which ruby 
which rails
to find that all appears to be in order. You have rubygems installed , ruby is installed and so is rails. You also find that each are pointing to the correct location, which is something like /usr/bin/gem -> /opt/ruby-enterprise-x.x.x.x/bin/gem, where x.x.x.x is the version of REE.

The problem isn't however, with any of the above. The issue is with the location of irb. If you installed (like me) irb with apt-get install irb, then irb isn't aware of your shiny new REE and ruby gems. It's a simple fix however, unlink irb and symlink the /usr/bin/irb to REE's irb like so...

rm /usr/bin/irb
And symlink it to the irb that REE has in bin
ln -s /opt/ruby-enterprise-x.x.x.x/bin/irb /usr/bin/irb

Now cd into your rails app and run

./script/console production

Tagged with..
#console #irb #Linux #passenger #production #Rails #ruby enterprise edition #rubygems #ubuntu #Linux #ruby #Ruby on Rails

Just finishing up brewing up some fresh ground comments...