Created
January 19, 2011 09:51
-
-
Save artemave/785926 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
| desc "Tell app to use local gems and tweak bundler to not break with gems coming from git" | |
| task :enable_local_gems_and_bundler do | |
| run %(perl -pi -e 'print "ENV[\\"GEM_HOME\\"] = \\"/home/#{user}/.gems\\"\\nGem.clear_paths\\n" if $. == 1' #{release_path}/config/application.rb) | |
| run "echo 'BUNDLE_PATH: /home/#{user}/.gems/bundler' >> #{release_path}/.bundle/config" | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or, instead of this remarkably efforted hack, one could go with "require 'bundler/capistrano'" in deploy.rb