Skip to content

Instantly share code, notes, and snippets.

@williamn
Created June 16, 2011 05:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save williamn/1028698 to your computer and use it in GitHub Desktop.
Save williamn/1028698 to your computer and use it in GitHub Desktop.
Fixing "undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x...> (NameError)"
# 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
@tinderfields
Copy link

Thank you, thank you, thank you!

@jobinthepast
Copy link

👍

@wellington1993
Copy link

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment