根据RailsCasts的指南,我将使用capistrano部署到VPS。http://railscasts.com/episodes/335-deploying-to-a-vps?view=asciicast
它在部署上失败了:冷命令,与有冲突。实际上,我看不出问题是什么,因为当我将shell放到同一个用户中时,Ruby版本看起来是正确的。
$ cap shell
cap> which ruby
[establishing connection(s) to 192.xxx.xxx.xxx]
** [out :: 192.xxx.xxx.xxx] /home/deployer/.rbenv/shims/ruby
cap> ruby -v
** [out :: 192.xxx.xxx.xxx ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]这是一个错误:
command finished in 655ms
* 2013-07-01 16:40:39 executing `bundle:install'
* executing "cd /home/deployer/rails/assay/releases/20130701144038 && bundle install -- gemfile /home/deployer/rails/assay/releases/20130701144038/Gemfile --path /home/deployer/rails/assay/shared/bundle --deployment --quiet --without development test"
servers: ["192.xxx.xxx.xxx"]
[192.xxx.xxx.xxx] executing command
** [out :: 192.xxx.xxx.xxx] rbenv: version `1.9.3' is not installed
command finished in 662ms
*** [deploy:update_code] rolling back我的问题是:如何调试?当我阅读deploy.rb文件时,我看不到它在哪里引用了Ruby。相当令人沮丧,我已经准备好要启动回购,这显然不是理想的。
发布于 2013-07-01 20:50:35
嗯,我终于找到了问题的症结所在--卡皮斯特拉诺使用的红宝石版本和服务器上的实际内容不匹配。
要调试Capistrano,请按以下方式运行它:
cap deploy:cold -d也就是说,在删除临时目录之前,您可以逐步遍历这些命令,并访问远程服务器上的临时目录。
https://stackoverflow.com/questions/17409191
复制相似问题