卡皮斯特拉诺在我的deploy.rb中不适用于deploy.rb。
我试过了
set :sudo, 'rvmsudo'
set :sudo_prompt, 'password: '然后使用以下命令运行命令:
sudo "god -c config/unicorn.god --log-level debug"但是卡皮斯特拉诺被密码提示卡住了。
这个解决方案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发布于 2011-11-13 03:38:27
你在做什么?
require 'bundler/capistrano'很讨厌,但你可以试试:
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发布于 2013-03-28 14:37:06
试着使用这个:
task :do_something do
run "cd #{latest_release} && rvmsudo -p '#{sudo_prompt}' some_command"
end对我起作用了!
发布于 2012-09-21 14:48:22
尝试在run命令中使用sudo,但从set调用sudo:
task :do_something do
run "#{sudo} root task"
end这样,如果你改变主意,你不需要重写所有的任务,只需要删除set :sudo。
https://stackoverflow.com/questions/8109378
复制相似问题