Created
September 27, 2009 06:56
-
-
Save toolmantim/194648 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To be stuck in the top of your Sinatra app or whichever file you want to | |
| # declare the gems. | |
| # | |
| # Use this to ensure you use the same local gems as you do in production. | |
| # Check it's a file as Heroku replaces .gems with a dir full of gems | |
| File.file?(gems_file = "#{File.dirname(__FILE__)}/.gems") && File.read(gems_file).each do |gem_decl| | |
| gem_name, version = gem_decl[/^([^\s]+)/,1], gem_decl[/--version ([^\s]+)/,1] | |
| version ? gem(gem_name, version) : gem(gem_name) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment