Rails RubyGem error

Posted by Raymond Law Wed, 19 Mar 2008 02:46:00 GMT

If you run into this error in a Rails app:

uninitialized constant Gem::Version::NUM_RE

Add this to your environment.rb above the initializer:

module Gem
  class Version
    NUM_RE = /\s*(\d+(\.\d+)*)*\s*/
  end
end

Credit goes to Ola Mork