使用capistrano在track app上部署ruby - cap deploy:setup faileding

时间:2012-02-09 20:02:22

标签: ruby-on-rails rvm capistrano

我已经浪费了几天这个问题,我确定这是一个简单的解决方案,请帮助! 当我从笔记本电脑上的用户帐户运行$ cap deploy:setup时,我会收到下面粘贴的错误。 RVM似乎存在问题,但我知道它已安装,而且我已预先安装了我的应用程序所需的所有宝石。有没有其他人遇到类似的错误?任何帮助将非常感谢!

  * 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

2 个答案:

答案 0 :(得分: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 / local / rvm)。将以下内容添加到我的Capfile中解决了这个问题:

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

答案 1 :(得分:0)

错误显示:RVM无法使用'默认'宝石。意味着RVM无法找到名为'默认'的宝石集。使用。检查deploy.rb中的以下行

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