2017-07-17 121 views
0

我升級在Linux CentOS 6的一個Ruby on Rails的軟件,並運行時,我如何知道哪個gem需要依賴到另一個無法安裝的依賴項?

bundle install 

它停在:

Gem::InstallError: nokogiri requires Ruby version >= 2.1.0. 
An error occurred while installing nokogiri (1.8.0), and Bundler cannot continue. 
Make sure that `gem install nokogiri -v '1.8.0'` succeeds before bundling. 

但是,我知道不需要gemfiles依賴nokogiri 1.8.0,它們檢查我安裝的Ruby版本,如果我沒有安裝Ruby 2.1,只需要1.6.8。

我已經試過

gem dependency nokogiri --reverse-dependencies 

但隨着版本1.8.0未安裝,它不是反向依賴上市。

那麼我可以從哪裏獲得關於哪個gem或gemfile實際上試圖強制使用nokogiri 1.8.0的信息?

[編輯:我更換了新的版本,1.15.2我的老版捆綁的輸出安裝,因爲它現在提供了不同的信息] 束的輸出安裝--verbose:

Fetching rdoc 5.1.0 
Installing rdoc 5.1.0 
Using redcarpet 3.3.4 
0: redcarpet (3.3.4) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/redcarpet-3.3.4.gemspec 
Using redis 3.3.3 
0: redis (3.3.3) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/redis-3.3.3.gemspec 
Using request_store 1.0.5 
0: request_store (1.0.5) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/request_store-1.0.5.gemspec 
Using tilt 2.0.7 
0: tilt (2.0.7) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/tilt-2.0.7.gemspec 
Using rmagick 2.16.0 
0: rmagick (2.16.0) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/rmagick-2.16.0.gemspec 
Using ruby-ole 1.2.12.1 
0: ruby-ole (1.2.12.1) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/ruby-ole-1.2.12.1.gemspec 
Using rubyzip 1.2.1 
0: rubyzip (1.2.1) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/rubyzip-1.2.1.gemspec 
Using simplecov-html 0.9.0 
0: simplecov-html (0.9.0) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/simplecov-html-0.9.0.gemspec 
Using tiny_tds 0.6.2 
0: tiny_tds (0.6.2) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/tiny_tds-0.6.2.gemspec 
Using vcard 0.2.15 
0: vcard (0.2.15) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/vcard-0.2.15.gemspec 
Using yard 0.9.9 
0: yard (0.9.9) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/yard-0.9.9.gemspec 
Using tzinfo 1.2.3 
0: tzinfo (1.2.3) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/tzinfo-1.2.3.gemspec 
Fetching nokogiri 1.8.0 
Installing nokogiri 1.8.0 with native extensions 
Using rack-test 0.6.3 
0: rack-test (0.6.3) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/rack-test-0.6.3.gemspec 
Using rack-protection 1.5.3 
0: rack-protection (1.5.3) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/rack-protection-1.5.3.gemspec 
Using vegas 0.1.11 
0: vegas (0.1.11) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/vegas-0.1.11.gemspec 
Using mime-types 3.1 
0: mime-types (3.1) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/mime-types-3.1.gemspec 
Using addressable 2.5.1 
0: addressable (2.5.1) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/addressable-2.5.1.gemspec 
Using childprocess 0.7.1 
0: childprocess (0.7.1) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/childprocess-0.7.1.gemspec 
Using sprockets 3.7.1 
0: sprockets (3.7.1) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/sprockets-3.7.1.gemspec 
Using redmine_crm 0.0.31 
0: redmine_crm (0.0.31) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/redmine_crm-0.0.31.gemspec 
Using mocha 1.2.1 
0: mocha (1.2.1) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/mocha-1.2.1.gemspec 
Using rack-openid 1.4.2 
0: rack-openid (1.4.2) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/rack-openid-1.4.2.gemspec 
Using rbpdf 1.19.2 
0: rbpdf (1.19.2) from /usr/local/rvm/gems/ruby-2.0.0-p247/specifications/rbpdf-1.19.2.gemspec 
Gem::InstallError: rdoc requires RubyGems version >= 2.2. Try 'gem update --system' to update RubyGems itself. 
    /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/installer.rb:541:in `ensure_required_rubygems_version_met' 
+0

你能運行'bundle install --verbose'併發布輸出嗎?另外,你可以發佈你的Gemfile嗎? – eiko

+0

是的,我曾嘗試使用--verbose,但找不到任何有用的信息: – Olivier

+0

我在原始帖子中添加了--verbose結果。 關於主要的gemfile,它是redmine 3.4.2的一個: https://bitbucket.org/redmine/redmine/src/59f64ccf3604022d4400b5884acea86b9fc5b4fa/Gemfile?at=3.4-stable&fileviewer=file-view-default 但我跑了捆綁安裝與今天早上的redmine 3.4.1的代碼,並沒有得到任何錯誤,所以我對發生了什麼感到困惑(3.4.1和3.4.2之間並沒有太多的變化,沒有看起來涉及與nokogiri相關的寶石) 。 – Olivier

回答

0

它看起來像你運行一箇舊版本的捆綁軟件(1.9.1),它可能沒有適當的支持ruby版本。嘗試運行gem update bundler並使用新版本運行bundle install

+0

事實上,在更新打包器之後,我有不同的信息。它現在告訴我,它是rdoc 5.1,它不能安裝... – Olivier

+0

我不明白... 我已經再次運行軟件包安裝(沒有--verbose),它工作。 我用--verbose再次運行它,而且再也沒有問題了。問題解決了,但我不明白爲什麼。 – Olivier

+0

謝謝eiko的解決我的問題的好建議! – Olivier

0

所以看來這個問題來自使用舊版本的捆綁軟件(1.9.1)。

將其升級到gem update bundler的最新版本讓我感到版本1.15.2,然後bundle安裝正常(第二次執行,但最終確實成功)。