Capistrano 的 rvmsudo 开关?

发布于 2024-12-01 15:35:01 字数 1000 浏览 0 评论 0原文

这类似于:

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趁微风不噪 2024-12-08 15:35:01

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

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

然后 RVM 命令的范围将限于此 gemset 和用户。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文