Friday, November 29, 2013

undefined local variable or method `version_requirements' in Rails 2.3.5

rake aborted!
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x7ff44ee9aad0>

Solution:

Put this code in config/environment.rb between Bootstrap and initializer:

if Gem::VERSION >= "1.3.6"

  module Rails
    class GemDependency
      def requirement
        r = super
        (r == Gem::Requirement.default) ? nil : r
      end
    end
  end
end
Reactions:

0 comments:

Post a Comment