2012-02-09 83 views
4

我已經浪費了幾天的時間解決這個問題,我相信這是一個簡單的解決方案,請大家幫忙! 當我從我的筆記本電腦上的用戶帳戶運行$ cap deploy:setup時,我收到下面粘貼的錯誤。看起來RVM存在問題,但我知道它已經安裝了,並且我預先安裝了我的應用程序所需的所有寶石。有沒有其他人遇到類似的錯誤?任何幫助將非常感激! 使用capistrano在rails應用上部署ruby - cap deploy:安裝失敗

* executing `deploy:setup' 
    * executing "mkdir -p /usr/local/www/sites/arbiter.nullpointer.ca/public/ /usr/local/www/sites/arbiter.nullpointer.ca/public/releases /usr/local/www/sites/arbiter.nullpointer.ca/public/shared /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/system /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/log /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/pids && chmod g+w /usr/local/www/sites/arbiter.nullpointer.ca/public/ /usr/local/www/sites/arbiter.nullpointer.ca/public/releases /usr/local/www/sites/arbiter.nullpointer.ca/public/shared /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/system /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/log /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/pids" 
    servers: ["arbiter.nullpointer.ca"] 
    [arbiter.nullpointer.ca] executing command 
** [out :: arbiter.nullpointer.ca] 
** [out :: arbiter.nullpointer.ca] $rvm_path (system_wide) does not exist. 
*** [err :: arbiter.nullpointer.ca] /usr/local/rvm/scripts/rvm: line 154: __rvm_teardown: command not found 
*** [err :: arbiter.nullpointer.ca] /usr/local/rvm/bin/rvm-shell: line 74: rvm: command not found 
*** [err :: arbiter.nullpointer.ca] Error: RVM was unable to use 'default' 
    command finished 
failed: "rvm_path=system_wide /usr/local/rvm/bin/rvm-shell 'default' -c \"mkdir -p /usr/local/www/sites/arbiter.nullpointer.ca/public/ /usr/local/www/sites/arbiter.nullpointer.ca/public/releases /usr/local/www/sites/arbiter.nullpointer.ca/public/shared /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/system /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/log /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/pids && chmod g+w /usr/local/www/sites/arbiter.nullpointer.ca/public/ /usr/local/www/sites/arbiter.nullpointer.ca/public/releases /usr/local/www/sites/arbiter.nullpointer.ca/public/shared /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/system /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/log /usr/local/www/sites/arbiter.nullpointer.ca/public/shared/pids\"" on arbiter.nullpointer.ca 
+0

您使用的是什麼版本的RVM?這可能是值得更新,因爲這個問題似乎相關:https://github.com/wayneeseguin/rvm/issues/586 – 2012-02-09 20:29:20

+0

嗨,謝謝你的迴應。我正在使用rvm 1.10.2。 – 2012-02-09 20:33:46

+1

它看起來像你的配置中的一個問題,發佈'rvm的設置' – mpapis 2012-02-11 12:45:21

回答

15

我只是碰到了這個問題,但我的安裝與抱怨:

out :: server] 
** [out :: server] $rvm_path (/home/nebula/.rvm/) does not exist. 
*** [err :: server] /usr/local/rvm/scripts/rvm: line 185: __rvm_teardown: command not found 
*** [err :: server] /usr/local/rvm/bin/rvm: line 52: /home/nebula/.rvm//scripts/rvm: No such file or directory 
*** [err :: server] Error sourcing RVM! 
*** [err :: server] Error: RVM was unable to use 'ruby-1.9.3-p392' 

我使用RVM與全系統的安裝,(標準安裝到/ usr /本地/ RVM)。將以下內容添加到我的Capfile中解決了此問題:

set :rvm_type, :system 
set :rvm_path, "/usr/local/rvm" 
+0

確實有效!作爲腳註,我將補充說我首先使用了'set:rvm_bin_path,「/ usr/local/rvm/bin」',雖然這個信息是正確的(我確實有一個包含可執行文件的bin文件夾),但這一直給我同樣的錯誤。當我把這行改爲'set:rvm_path,「/ usr/local/rvm」'它工作得很好。 – SylvainB 2013-04-17 08:49:44

0

錯誤顯示:RVM無法使用'默認'gemset。意味着RVM無法找到名爲'default'的gemset以供使用。檢查您的deploy.rb中的以下行:

set :rvm_ruby_string, 'gemset-name-here' => put a valid gemset here