rvmsudo switch for Capistrano?
This is similar to:
Using rvmsudo with Capistrano
I'm wondering if there is a specific switch in rvm/capistrano that enables rvmsudo. Without it I get errors like:
* executing "cd /home/Blog/releases/20110826194116 && bundle install --gemfile /home/Blog/releases/20110826194116/Gemfile --path /home/Blog/shared/bundle --deployment --quiet --without development test"
servers: ["199.168.0.1"]
[199.168.0.1] executing command
*** [err :: 199.168.0.1] /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:551:in `rescue in block in build_extensions开发者_如何学Python': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
*** [err :: 199.168.0.1]
*** [err :: 199.168.0.1] /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
*** [err :: 199.168.0.1] creating Makefile
*** [err :: 199.168.0.1]
*** [err :: 199.168.0.1] make
*** [err :: 199.168.0.1] sh: make: Permission denied
I think that you can use the rvm envrionment variables like this as part of your deploy:
set :rvm_ruby_string, 'ruby-1.9.2-p290@some_gemset'
set :rvm_type, :user
then RVM commands will be scoped to this gemset and user.
精彩评论