简体   繁体   中英

Bundle install error on remote server after capistrano deployment

Here is the error from bundle install after capistrano deployment rails 3.1 app:

dtt@ubuntu:/$ cd /vol/www/emclab
dtt@ubuntu:/vol/www/emclab$ /home/dtt/.rvm/gems/ruby-1.9.2-p290/bin/bundle install vendor/gems
/home/dtt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError)
        from /home/dtt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
        from /home/dtt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
        from /home/dtt/.rvm/gems/ruby-1.9.2-p290/bin/bundle:18:in `<main>'

Here is the output with gem list under /current subdir:

dtt@ubuntu:/vol/www/emclab/current$ gem list

*** LOCAL GEMS ***

actionmailer (3.1.1)
actionpack (3.1.1)
activerecord (3.1.1)
activeresource (3.1.1)
activesupport (3.1.1)
arel (2.2.1)
builder (3.0.0)
bundler (1.0.21)
daemon_controller (0.2.6)
erubis (2.7.0)
fastthread (1.0.7)
hike (1.2.1)
i18n (0.6.0)
json (1.6.1)
mail (2.3.0)
mime-types (1.17.2)
minitest (1.6.0)
multi_json (1.0.3)
passenger (3.0.9)
polyglot (0.3.2)
rack (1.3.5)
rack-cache (1.1)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
railties (3.1.1)
rake (0.8.7)
rdoc (3.11, 2.5.8)
sprockets (2.0.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.30)

Here is the error for gem install bundler:

root@ubuntu:/vol/www/emclab/current# gem install bundler
ERROR:  Could not find a valid gem 'bundler' (>= 0) in any repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)

Any thoughts about how to fix the problem? Thanks.

It looks like you don't have Bundler installed. SSH to the remote machine and sudo gem install bundler first. Then the deployment should work.

Don't forget to ommit the sudo if you're using RVM, which means only gem install bundler .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM