ruby on rails-capistrano dev部署失败



capistrano部署有点新,所以我很难让它正常工作。我发现另一个条目说这是一个符号链接问题,但我不认为是因为"cap-dev-deploy"正确地创建了当前的符号链接。我在这台服务器上有一个stage和一个dev环境(/apps/myhost/dev和/apps/my host/stage),我希望将我最近的git更改从git推送到dev环境中。我SSH作为应用程序用户加入并执行:

cap dev deploy

我收到以下错误:

failed: "rvm_path=/usr/local/rvm /usr/local/bin/rvm-shell 'ree@myhost' -c 'bundle install --gemfile /apps/myhost/dev/releases/20110526014237/Gemfile --path /apps/myhost/dev/shared/bundle --deployment --quiet --without development test'" on dev.myhost.com

前面有很多:

rm: cannot remove directory `/apps/myhost/dev/releases/20110526014237/test/functional': No such file or directory

我认为rm错误是因为目录和文件已经被清理,但我不确定rvm_path rvm shell为什么失败?

如果SSHing在中自己运行失败的命令,会发生什么?看起来它在安装捆绑包时失败了。你安装了Bundler吗?我从未使用Cap在/apps/下部署过两个环境。你能让它只在一个环境中工作吗?最后,我会先修复那些rm错误,然后再处理它们。一次做一件事。

检查了my/apps/myapp/dev/config/deploy/目录,发现了以下文件:

dev.rb
stage.rb
prod.rb

设置了角色和服务器变量,因此尝试部署两次导致锁定。删除了服务器行并能够进行部署。

关于信托;将此行添加到config/deploy.rb:

task :trust_rvmrc do
    run "rvm rvmrc trust #{latest_release}"
end

最新更新