所以我运行cap deploy尝试部署到ec2,并得到这个问题:
** [ec2-54-200-24-60.us-west-2.compute.amazonaws.com :: out] * RVM has encountered a new or modified .rvmrc file in the current *
** * directory, this is a shell script and therefore may contain any shell *
** * commands. *
** * *
** * Examine the contents of this file carefully to be sure the contents are *
** * safe before trusting it! *
** * Do you wish to trust '/var/www/highlandsfbart#/shared/cached-copy/.rvmrc'? *
** * Choose v[iew] below to view the contents *
** [ec2-54-200-24-60.us-west-2.compute.amazonaws.com :: out] ******************************************************************************
** [ec2-54-200-24-60.us-west-2.compute.amazonaws.com :: out] y[es], n[o], v[iew], c[ancel]>
但是,当我输入y并按回车键时,它会挂起并且没有任何反应。当我输入v并输入时相同。
我尝试修改我的(本地)项目文件夹中的.rvmrc文件,但这没有做任何事情。
rvm_trust_rvmrcs_flag=1
我也尝试将此代码添加到我的deploy.rb中,但仍然没有运气:
namespace :rvm do
desc 'Trust rvmrc file'
task :trust_rvmrc do
run "rvm rvmrc trust #{current_release}"
end
end
after "deploy:update_code", "rvm:trust_rvmrc"
任何帮助都将不胜感激。
答案 0 :(得分:3)
您需要在每个服务器上以用户身份运行它:
echo rvm_trust_rvmrcs_flag=1 | sudo tee -a /etc/rvmrc
或以root身份:
echo rvm_trust_rvmrcs_flag=1 >> /etc/rvmrc