簡體   English   中英

Gem :: InstallError:nokogiri需要Ruby版本> = 1.9.2

[英]Gem::InstallError: nokogiri requires Ruby version >= 1.9.2

嘗試對ruby(sinatra)項目進行bundle install ,我不斷收到此錯誤:

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

所以我繼續和gem install nokogiri -v '1.6.0'並以成功結束。

然后我再次嘗試bundle install並得到錯誤。 沖洗並重復。

我不是一個紅寶石開發者,所以我不知道該做什么。 有幫助嗎?

你有沒有嘗試過Bundle update

另外,強烈建議您使用Ruby版本控制 - rvm是一個很好的解決方案。 https://rvm.io/

然后你可以用rvm use ruby-version@myNewApp --create ,然后ditch --create每次使用它或使用.rvmrc並在那里粘貼那條線所以它會自動使用不同寶石的漂亮干凈版本,具體取決於每個應用程序你創造。

您可以在Gemfile中檢查ruby版本聲明,也許它已鎖定在1.8

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM