Ruby抱怨它无法找到构建器?

时间:2013-02-22 15:26:29

标签: ruby rvm

我使用gem install重新安装了rmagick和mini_magick,之后运行我需要修复的ruby脚本,我收到以下错误:

/Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find builder (~> 3.0.0) amongst [Ascii85-1.0.2, actionpack-3.2.12, activemodel-3.2.12, activerecord-3.2.12, activerecord-mysql2-adapter-0.0.3, activesupport-3.2.12, addressable-2.3.3, afm-0.2.0, archive-tar-minitar-0.5.2, arel-3.0.2, aws-s3-0.6.3, aws-ses-0.4.4, builder-3.1.4, bundler-1.2.4, columnize-0.3.6, cookiejar-0.3.0, daemon-kit-0.2.1, diff-lcs-1.2.1, em-http-request-1.0.3, em-socksify-0.2.1, em-synchrony-1.0.3, erubis-2.7.0, eventmachine-1.0.0, factory_girl-4.2.0, god-0.13.1, hashery-2.1.0, hike-1.2.1, http_parser.rb-0.5.3, i18n-0.6.1, journey-1.0.4, linecache19-0.5.12, little-plugger-1.1.3, logging-1.8.1, mail-2.5.3, mailfactory-1.4.0, mime-types-1.21, mini_magick-3.5.0, multi_json-1.6.1, mysql2-0.3.11, pdf-reader-1.3.1, polyglot-0.3.3, prawn-0.12.0, prawn-fast-png-0.2.3, rack-1.5.1, rack-cache-1.2, rack-protection-1.3.2, rack-test-0.6.2, rake-10.0.3, redis-3.0.2, redis-namespace-1.2.1, resque-1.23.0, rmagick-2.13.2, rspec-2.12.0, rspec-core-2.12.2, rspec-expectations-2.12.1, rspec-mocks-2.12.2, rubigen-1.5.8, ruby-debug-base19-0.11.25, ruby-debug-base19x-0.11.29, ruby-debug-ide-0.4.16, ruby-rc4-0.1.5, ruby_core_source-0.1.5, rubygems-bundler-1.1.0, rufus-scheduler-2.0.17, rvm-1.11.3.6, safe_attributes-1.0.9, safely-0.3.2, sinatra-1.3.4, sprockets-2.8.2, state_machine-1.1.2, subexec-0.2.2, tenderlove-frex-1.0.1.20090313144615, thor-0.17.0, tilt-1.3.3, treetop-1.4.12, ttfunk-1.0.3, tzinfo-0.3.35, vegas-0.1.11, xml-simple-1.1.2] (Gem::LoadError)
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:778:in `block in activate_dependencies'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `each'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `activate_dependencies'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in `activate'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:781:in `block in activate_dependencies'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `each'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `activate_dependencies'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in `activate'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `try_activate'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
    from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from ./q_test.rb:4:in `<main>'

我的rvm gemset上安装了以下gem:

actionpack (3.2.12)
activemodel (3.2.12)
activerecord (3.2.12)
activerecord-mysql2-adapter (0.0.3)
activesupport (3.2.12)
addressable (2.3.3)
afm (0.2.0)
archive-tar-minitar (0.5.2)
arel (3.0.2)
Ascii85 (1.0.2)
aws-s3 (0.6.3)
aws-ses (0.4.4)
builder (3.1.4)
bundler (1.2.4)
columnize (0.3.6)
cookiejar (0.3.0)
daemon-kit (0.2.1)
diff-lcs (1.2.1)
em-http-request (1.0.3)
em-socksify (0.2.1)
em-synchrony (1.0.3)
erubis (2.7.0)
eventmachine (1.0.0)
factory_girl (4.2.0)
god (0.13.1)
hashery (2.1.0)
hike (1.2.1)
http_parser.rb (0.5.3)
i18n (0.6.1)
journey (1.0.4)
linecache19 (0.5.12)
little-plugger (1.1.3)
logging (1.8.1)
mail (2.5.3)
mailfactory (1.4.0)
mime-types (1.21)
mini_magick (3.5.0)
multi_json (1.6.1)
mysql2 (0.3.11)
pdf-reader (1.3.1)
polyglot (0.3.3)
prawn (0.12.0)
prawn-fast-png (0.2.3)
rack (1.5.1)
rack-cache (1.2)
rack-protection (1.3.2)
rack-test (0.6.2)
rake (10.0.3)
redis (3.0.2)
redis-namespace (1.2.1)
resque (1.23.0)
rmagick (2.13.2)
rspec (2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.2)
rubigen (1.5.8)
ruby-debug-base19 (0.11.25)
ruby-debug-base19x (0.11.29)
ruby-debug-ide (0.4.16)
ruby-rc4 (0.1.5)
ruby_core_source (0.1.5)
rubygems-bundler (1.1.0)
rufus-scheduler (2.0.17)
rvm (1.11.3.6)
safe_attributes (1.0.9)
safely (0.3.2)
sinatra (1.3.4)
sprockets (2.8.2)
state_machine (1.1.2)
subexec (0.2.2)
tenderlove-frex (1.0.1.20090313144615)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
ttfunk (1.0.3)
tzinfo (0.3.35)
vegas (0.1.11)
xml-simple (1.1.2)

不知道为什么会这样?它正在努力,我删除并重新安装了rmagick?

1 个答案:

答案 0 :(得分:1)

安装构建器3.1.4时需要构建器3.0.x.

它说“找不到构建器(〜&gt; 3.0.0)”。 “〜&gt;”标记为“悲观版本约束”(此处描述为http://docs.rubygems.org/read/chapter/16#page74),其意思是“不关心最后一个数字”。所以,任何3.0.x都会套件,但3.1.x不会。