在capistrano部署之后,在远程服务器上捆绑安装错误

时间:2011-11-02 21:56:59

标签: ruby-on-rails ruby-on-rails-3.1 capistrano

以下是capistrano部署rails 3.1 app:

之后的bundle install错误
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>'

以下是/ current subdir下的gem列表输出:

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)

以下是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)

有关如何解决问题的任何想法?感谢。

1 个答案:

答案 0 :(得分:0)

看起来您没有安装Bundler。 SSH到远程计算机和sudo gem install bundler首先。然后部署应该有效。

如果您使用RVM,请不要忘记省略sudo,这仅表示gem install bundler