加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Capistrano rvmsudo

发布时间:2020-12-17 01:27:46 所属栏目:百科 来源:网络整理
导读:Capistrano在我的deploy.rb中不能与rvmsudo一起使用. 我试过了 set :sudo,'rvmsudo'set :sudo_prompt,'password: ' 然后运行命令: sudo "god -c config/unicorn.god --log-level debug" 但Capistrano卡在密码提示上. 这个解决方案here说使用sudo“whoami”
Capistrano在我的deploy.rb中不能与rvmsudo一起使用.

我试过了

set :sudo,'rvmsudo'
set :sudo_prompt,'password: '

然后运行命令:

sudo "god -c config/unicorn.god --log-level debug"

但Capistrano卡在密码提示上.

这个解决方案here说使用sudo“whoami”然后rvmsudo因为它会记住你的密码5分钟,但我的密码不会被记住.

背景:

desc "Start unicorn"
  task :start,:except => { :no_release => true } do
  sudo "god -c config/unicorn.god --log-level debug"
end

解决方法

你在做什么

require 'bundler/capistrano'

它的hacky,但你可以尝试:

after "deploy:update_code",:do_bundle_install

task :do_bundle_install do
  run "cd #{current_release} && rvmsudo bundle install --gemfile #{current_release}/Gemfile --path {path to install}/bundle --without development test cucumber"
end

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读