RoR nearly falls early 1

Posted by Simon Tue, 05 Jun 2007 14:10:00 GMT

While trying to get a new Ruby on Rails application up and running on one of my servers, I came across this:

$ ruby script/server   
./script/../config/boot.rb:29: undefined method `gem' for main:Object (NoMethodError)
        from script/server:2:in `require'
        from script/server:2

Being the first thing I ran after rails <myapp> this is quite an early point in the process to start failing!

The fix turned out to be:

$ sudo gem update --system

The slightly puzzling bit is that this machine already has other RoR applications running on it! I suspect the key difference is that they were developed elsewhere and only run on this machine under apache.

Comments

Leave a response

  1. John 2 days later:
    That deprecation in gem is really annoying. They changed require_gem to gem for no apparent reason. It makes developing rails on new servers, and then installing them on older productions ones a pain. If you upgrade gem, older rails apps start moaning about using require_gems. A dumb and pointless change. Grr.
Comments