[英]Ruby on rails: Bundler not installed when deploying using capistrano
I'm trying to deploy to a ubuntu server using capistrano and get the following error: 我正在尝试使用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
I've done some searching and found that some people have resolved this issue by putting require "bundler/capistrano" in their deploy.rb. 我进行了一些搜索,发现有些人通过在他们的deploy.rb文件中放置要求“ bundler / capistrano”来解决此问题。
I've tried that but it's not made any difference. 我已经尝试过了,但是没有任何区别。
I have also tried installing bundler on the server but get: 我也尝试在服务器上安装捆绑器,但得到:
$ 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.
I don't remember setting RVM up though, so this is a little confusing to me. 我不记得要设置RVM,所以这让我有些困惑。
Does any one have any suggestions? 有没有人有什么建议?
This is an old app btw, here is my gem list: 顺便说一句,这是一个旧应用,这是我的宝石清单:
% bundle exec gem list %bundle exec gem列表
* LOCAL GEMS * *当地的宝石*
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) 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)(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)分页器(1.1.1)机架(1.1.6)导轨(2.3.14)耙(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)
Thanks 谢谢
我认为问题是:您已将bundler安装到特定的gemset,这就是为什么只有在应用程序目录中才可用的原因,因此请尝试将bundler安装到全局gemset。
rvm gemset use global && gem install bundler
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.