【发布时间】:2013-04-20 10:36:44
【问题描述】:
我正在尝试使用 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,所以这让我有点困惑。
有人有什么建议吗?
顺便说一句,这是一个旧应用程序,这是我的宝石列表:
% bundle exec gem 列表
* 本地宝石 *
actionmailer (2.3.14) 动作包 (2.3.14) 活动记录(2.3.14) 活动资源(2.3.14) 积极支持 (2.3.14) 明盒 (2.3.9) 捆绑器 (1.3.5) 卡皮斯特拉诺 (2.14.2) 高线 (1.6.16) 锄头 (3.5.2) hpricot (0.8.2) htmldoc (0.2.3) json (1.7.7) macaddr (1.6.1) mysql (2.9.1) 网络SCP(1.1.0) 网络 sftp (2.1.1) 网络SSH(2.6.7) 网络 ssh 网关 (1.2.0) 分页器 (1.1.1) 机架 (1.1.6) 导轨 (2.3.14) 耙子 (10.0.4) rdoc (4.0.1) 红布 (4.2.9) rmagick (2.13.1) 系统(2.5.2) uuid (2.0.2) will_paginate (2.3.16) wkhtmltopdf-binary (0.9.9.1)
谢谢
【问题讨论】:
标签: ruby-on-rails ubuntu capistrano