script/server won't run because of RubyGems but gem commands run fine

Scott C Reynolds's Avatar

Scott C Reynolds

23 Feb, 2010 03:17 PM

Mac OSX Leopard

script/server yields the following:

Rails requires RubyGems >= . Please install RubyGems and try again:

(no version number is included in the message, which seems odd). gem commands seem to be working fine.

  1. 1 Posted by John Barnette on 23 Feb, 2010 03:19 PM

    John Barnette's Avatar

    Any concrete information? What version of Ruby are you running? Of RubyGems? Of Rails? I'm running Rails 2.3.5 on Ruby 1.8.7 with RubyGems 1.3.6 without a problem.

  2. 2 Posted by scott on 23 Feb, 2010 03:29 PM

    scott's Avatar


    rails 2.2.2 for this particular site. rails'd up a new site to test on rails 2.3.5 and got the same error, this time with a gem version number (1.3.2) in the message.

    gem version is 1.3.6, ruby is 1.8.7

    which ruby = /opt/local/bin/ruby
    which gem = /usr/bin/gem
    which rails = /usr/bin/rails

  3. 3 Posted by John Barnette on 23 Feb, 2010 03:38 PM

    John Barnette's Avatar

    Okay, thanks for the extra info. Based on playing One Of These Things Is Not Like The Other with your paths, I'd say that you're using a MacPorts install of Ruby with the system install (upgraded to 1.3.6) of RubyGems, which is probably not a good thing.

    In fact, I bet if you try making sure that /usr/bin/ruby is first in your path you'll find that everything works smoothly.

    If you're going to use Ruby from MacPorts, don't use it with the system install of RubyGems. Follow the manual/setup.rb installation instructions, and make sure that you use /opt/local/bin/ruby when you run setup.rb.

  4. 4 Posted by Scott on 23 Feb, 2010 09:44 PM

    Scott's Avatar

    Don't know that this was the most efficient way to fix this, but here's what I did:

    install rubygems from macports
    reinstall...lots of gems (probably all of them eventually but the ones that I needed to run this site were all I did)

  5. 5 Posted by John Barnette on 23 Feb, 2010 09:54 PM

    John Barnette's Avatar

    Glad it's working for you. The general rule of thumb here is to never install your primary Ruby from source on Mac OS X without immediately using that ruby to install a corresponding instance of RubyGems.

  6. John Barnette closed this discussion on 23 Feb, 2010 09:54 PM.

  7. scott re-opened this discussion on 23 Feb, 2010 10:03 PM

  8. 6 Posted by scott on 23 Feb, 2010 10:03 PM

    scott's Avatar

    my concern, in case anyone has additional insight, is that I had a perfectly functional rails/ruby environment until today. I haven't done any rails dev in a few weeks, and in that time I haven't added/subtracted anything from the environment, so unless a os x update broke it...I'm not sure what happened.

    good info though for when I set up new (which I will do soon I think, because I feel like this was less than optimal a solution)

  9. Nick Quaranto closed this discussion on 13 Mar, 2010 06:40 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac