简体   繁体   中英

Could not find nokogiri in any of the sources (Bundler::GemNotFound)

I've already read a dozen of installation problems with nokogiri gem here, but did not find how to resolve mine.

Gem installing proceeds without problems: Successfully installed nokogiri-1.6.3.1 .

But when I trying to open my rails app it says that:

Could not find nokogiri-1.6.3.1 in any of the sources (Bundler::GemNotFound) .

I've tried to install an older version 1.6.1 assuming that it could be more compatible, but in that case passenger (I use nginx passenger on Ubuntu 14.04 x64) says that can't find mini_portile 0.5.3 which is nokogiri depends on. What's going on there?

Same problem here. Putting this in the Gemfile works for me:

gem 'right_http_connection', git: 'git://github.com/rightscale/right_http_connection.git', ref: '3359524d81'

Seen on Ruby 2 Upgrade Breaks Nokogiri and/or open-uri Encoding? :

Ok, here's an answer, and maybe the answer. Ruby 2 changed how it uses headers in HTTP requests and zipping/deflating, but at some point they changed their minds back and put it to be how 1.9 worked. In the interim some Rails gem maintainers monkey patched HTTP:Net to make their gems work on both 1.9 and 2.0. Those monkey patches still linger in older versions of gems and cause issues like I saw upgrading from 1.9 to 2.1

将应用程序源部署到另一个文件夹解决了此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM