8

当我运行 bundle 时出现以下错误

~/rails_apps/redmine]# bundle
/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [RedCloth-4.2.9, ZenTest-4.8.2, actionmailer-2.3.14, actionpack-2.3.14, activerecord-2.3.14, activeresource-2.3.14, activesupport-2.3.14, cgi_multipart_eof_fix-2.5.0, daemons-1.1.5, eventmachine-0.12.10, fastercsv-1.5.5, fastthread-1.0.7, ferret-0.11.8.4, gchartrb-0.8, gem_plugin-0.2.3, icalendar-1.2.0, json-1.7.5, mongrel-1.1.5, rack-1.1.3, rails-2.3.14, rake-0.9.2.2, rmagick-2.13.1, rubygems-update-1.8.15, sqlite3-1.3.5, test-spec-0.10.0, tzinfo-0.3.33] (Gem::LoadError)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1208:in `gem'
    from /home/jmg810/ruby/gems/bin/bundle:18

这是我的本地宝石列表,您会注意到这些宝石与本地宝石的完整列表不匹配

*** LOCAL GEMS ***

actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord-jdbc-adapter (1.2.2)
activerecord-jdbcmysql-adapter (1.2.2)
activesupport (3.2.8)
bouncy-castle-java (1.5.0146.1)
builder (3.0.3)
bundler (1.2.1)
coderay (1.0.7)
edavis10-object_daddy (0.4.3)
erubis (2.7.0)
fastercsv (1.5.5)
hike (1.2.1)
i18n (0.6.1, 0.4.2)
jdbc-mysql (5.1.13)
journey (1.0.4)
jruby-openssl (0.7.7)
json (1.7.5)
mail (2.4.4)
mime-types (1.19)
multi_json (1.3.6)
mysql (2.8.1)
mysql2 (0.3.11)
net-ldap (0.3.1)
pg (0.14.1)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-test (0.6.1)
rake (0.9.2.2)
rmagick (2.13.1)
ruby-openid (2.2.0, 2.1.8)
sprockets (2.1.3)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)

这是我的宝石环境

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.15
  - RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/jmg810/ruby/gems
  - RUBY EXECUTABLE: /usr/bin/ruby
  - EXECUTABLE DIRECTORY: /home/jmg810/ruby/gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/jmg810/ruby/gems
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gempath" => []
     - "gem" => "--remote --gen-rdoc --run-tests"
     - "gemhome" => "/home/jmg810/ruby/gems"
     - "rdoc" => "--inline-source --line-numbers"
  - REMOTE SOURCES:
     - http://rubygems.org/

我认为问题在于它没有在我当地的宝石中寻找

4

1 回答 1

6

在我的bash_profile我有$PATH:~/ruby/bin,而不是我需要~/ruby/bin:$PATH。它正在使用 gem in/usr/bin而不是~/ruby/bin.

于 2012-09-25T02:29:24.823 回答