我正在尝试使用 capistrano 部署到 ubuntu 服务器并收到以下错误:
Executing "cd /home/useracc/www/releases/20130420101911 && bundle install --gemfile /home/useracc/www/releases/20130420101911/Gemfile --path /home/useracc/www/shared/bundle --deployment --quiet --without development test"
servers: ["dev.website.com"]
[dev.self-sale.com] executing command
** [out :: dev.website.com] ERROR: Gem bundler is not installed, run `gem install bundler` first.
** [out :: dev.website.com]
command finished in 510ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/useracc/www/releases/20130420101911; true"
servers: ["dev.website.com"]
[dev.self-sale.com] executing command
command finished in 613ms
failed: "sh -c 'cd /home/selfsale/www/releases/20130420101911 && bundle install --gemfile /home/useracc/www/releases/20130420101911/Gemfile --path /home/useracc/www/shared/bundle --deployment --quiet --without development test'" on dev.website.com
我进行了一些搜索,发现有些人通过在 deploy.rb 中添加 require “bundler/capistrano” 解决了这个问题。
我试过了,但没有任何区别。
我也尝试在服务器上安装捆绑器,但得到:
$ gem install bundler
Fetching: bundler-1.3.5.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/rvm/gems/ruby-1.8.7-p371 directory.
我不记得设置了 RVM,所以这让我有点困惑。
有没有人有什么建议?
顺便说一句,这是一个旧应用程序,这是我的宝石列表:
% 捆绑执行宝石列表
*当地宝石*
actionmailer (2.3.14) actionpack (2.3.14) activerecord (2.3.14) activeresource (2.3.14) activesupport (2.3.14) brightbox (2.3.9) bundler (1.3.5) capistrano (2.14.2) highline ( 1.6.16) hoe (3.5.2) hpricot (0.8.2) htmldoc (0.2.3) json (1.7.7) macaddr (1.6.1) mysql (2.9.1) net-scp (1.1.0) net- sftp (2.1.1) net-ssh (2.6.7) net-ssh-gateway (1.2.0) paginator (1.1.1) rack (1.1.6) rails (2.3.14) rake (10.0.4) rdoc ( 4.0.1) RedCloth (4.2.9) rmagick (2.13.1) systemu (2.5.2) uuid (2.0.2) will_paginate (2.3.16) wkhtmltopdf-binary (0.9.9.1)
谢谢