Read more

Fixing "undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x...> (NameError)"

Deleted user #6
March 28, 2011Software engineer

Phillip Koebbe from Ruby on Rails suggested inserting following code between the "bootstrap" and "initialize" sections of enviroment.rb. This hack fixes the problem.

if Gem::VERSION >= "1.3.6"
  module Rails
    class GemDependency
      def requirement
        r = super
        (r == Gem::Requirement.default) ? nil : r
      end
    end
  end
end
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot
Posted to makandra dev (2011-03-28 12:35)