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 web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot
Posted to makandra dev (2011-03-28 12:35)