简体   繁体   English

Ruby on Rails:使用capistrano部署时未安装捆绑器

[英]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.

相关问题 Ruby on Rails:Bundler和Capistrano:指定在部署时要排除的组(开发,测试) - Ruby on Rails: Bundler & Capistrano: specify which groups (development, test) are to be excluded when deploying / usr / bin / env ruby​​没有这样的文件或目录:使用capistrano 3,capistrano / rbenv,capistrano / bundler和capistrano / rails(使用rails 4) - /usr/bin/env ruby no such file or directory: Using capistrano 3, capistrano/rbenv, capistrano/bundler and capistrano/rails (using rails 4) 使用 capistrano 部署时,Bundler 找不到“whenever” gem - Bundler cannot find `whenever` gem, when deploying using capistrano 使用 capistrano 部署时 Ruby on Rails“KeyError: key not found” - Ruby on Rails "KeyError: key not found" when deploying with capistrano Ruby On Rails:使用Capistrano 3进行部署时,如何在文件中写入yml配置? - Ruby On Rails: How to write yml configurations in a file when deploying with Capistrano 3? Ruby on Rails:部署时PostgreSQL / Capistrano覆盖了迁移 - Ruby on Rails: PostgreSQL/Capistrano override migration when deploying 使用capistrano在track app上部署ruby - cap deploy:setup faileding - deploying ruby on rails app using capistrano - cap deploy:setup failing 与Bundler和Capistrano一起部署时遇到问题 - Trouble on deploying with Bundler and Capistrano Capistrano:未安装宝石捆绑器 - Capistrano: Gem bundler is not installed 使用Capistrano部署Rails应用 - Deploying rails app using Capistrano
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM