根据 RailsCasts 的指南,我正在使用 capistrano 部署到 VPS。 http://railscasts.com/episodes/335-deploying-to-a-vps?view=asciicast
deploy:cold命令失败,与 Ruby 冲突。我实际上看不出问题出在哪里,因为当我向同一个用户发送外壳时,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 版本。非常令人沮丧,我正准备 ftp 上的 repo,这显然不理想。