Guest User

Untitled

a guest
May 17th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def load_rails_gem
  2. if version = self.class.gem_version
  3. if version =~ /~>\s*((\d+\.){2})\d+/
  4. gem 'rails', version, "< #{$1}99"
  5. else
  6. gem 'rails', version
  7. end
  8. else
  9. gem 'rails'
  10. end
  11. end
  12.  
  13. # now, specifying '~> 2.0.2' as RAILS_GEM_VERSION results in this call:
  14. gem 'rails', '~> 2.0.2', '< 2.0.99'
Add Comment
Please, Sign In to add comment