Skip to content

Instantly share code, notes, and snippets.

@adriand
Created September 22, 2011 14:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriand/1234933 to your computer and use it in GitHub Desktop.
Save adriand/1234933 to your computer and use it in GitHub Desktop.
How to use newer versions of RubyGems with older versions of Rails
# IN ENVIRONMENT.RB, ADD THESE LINES AFTER THE BOOT SECTION AND BEFORE THE INITIALIZER BLOCK
# (e.g. on line 13 of most environment.rb's):
if Gem::VERSION >= "1.3.6"
module Rails
class GemDependency
def requirement
r = super
(r == Gem::Requirement.default) ? nil : r
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment