2013-10-07 99 views
1

所以我跑帽部署嘗試和部署到EC2,並得到這個問題:Capistrano的上限部署問題與RVMRC

** [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" 

任何幫助,將不勝感激。

回答

3

你需要在每個服務器上的用戶運行它:

echo rvm_trust_rvmrcs_flag=1 | sudo tee -a /etc/rvmrc 

或根:

echo rvm_trust_rvmrcs_flag=1 >> /etc/rvmrc 
+0

這似乎是工作,但我仍然得到如下:** [ec2-54 -200-24-60.us-west-2.compute.amazonaws.com ::出]無法創建目錄'/usr/local/rvm/gems/[email protected]」 ** [EC2 -54-200-24-60.us-west-2.compute.amazonaws.com :: out]:Permission denied。有任何想法嗎? – mlstudent

+0

這是一個新問題......你確定你的用戶在'rvm'組嗎?你應該嘗試https://github.com/wayneeseguin/rvm-capistrano - ''deploy'之前,'rvm:create_gemset' – mpapis