rvmsudo为Capistrano开关?

时间:2011-08-26 19:53:49

标签: ruby-on-rails rvm capistrano

这类似于:

Using rvmsudo with Capistrano

我想知道rvm / capistrano中是否有特定的开关启用了rvmsudo。没有它我会得到如下错误:

* 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': 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

1 个答案:

答案 0 :(得分:0)

我认为您可以使用像这样的rvm环境变量作为部署的一部分:

set :rvm_ruby_string, 'ruby-1.9.2-p290@some_gemset'
set :rvm_type, :user

然后RVM命令将限定为此gemset和用户。