2013-02-22 73 views
0

我重新安裝rmagick和mini_magick使用寶石安裝,並在此之後,運行Ruby腳本我需要修復,我得到了以下錯誤: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寶石安裝以下寶石:

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

當您安裝了構建器3.1.4時,您需要構建器3.0.x。

它說「無法找到生成器(〜> 3.0.0)」。 「〜>」標記爲「悲觀版本約束」(這裏描述爲http://docs.rubygems.org/read/chapter/16#page74),它僅僅意味着「不關心最後一位數字」。所以,任何3.0.x將套件,但3.1.x不會。