Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again (I have rubygems 1.3.6!)

I'm running rails version 2.3.5 and rubygems version 1.3.6, when I script/server I get this error

Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again:http://rubygems.rubyforge.org

any ideas how to fix this?

like image 315
raphael_turtle Avatar asked Dec 10 '25 06:12

raphael_turtle


2 Answers

The first thing you should do is run: gem env

This will output, amongst other things, the RUBYGEMS_VERSION and your GEM_PATHS. Verify that everything you think is true, is indeed true.

In the GEM_PATHS, you will probably see multiple paths, the top most being the primary path.

You can set GEM_HOME to the primary gem directory in the your .bash_login/etc file. Open a new terminal and run gem env again to make sure that it is being picked up.

As Gordon indicated, make sure these GEM paths are in your PATH.

Some other things to think about ownership/permissions. If you use sudo when working with gems on your system, they get installed in a different directory than when you install/update normally.

Perhaps you installed the rubygems using sudo, but rails is not running as root.

Read the installation notes if you still cannot figure it out: ruby gems installation

like image 136
Matt Dressel Avatar answered Dec 12 '25 19:12

Matt Dressel


Maybe it’s not finding your correct gem path. I’ve had similar problems related to that. You might need to update your bash prefs eg in .basrc you might have something like this:

GEMS=/home/me/ruby1.8/lib/ruby/gems/1.8/bin/ export PATH=$RUBY:$GEMS:$HOME/bin:$PATH:$NGINX:$MONIT:$GIT

like image 22
Gordon Isnor Avatar answered Dec 12 '25 18:12

Gordon Isnor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!