开发者

rvmsudo switch for Capistrano?

开发者 https://www.devze.com 2023-03-31 06:10 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号