轨道上的红宝石nokogiri错误?

时间:2021-01-16 07:34:31

I get this error when attempting to use the rails generate commands:

尝试使用rails generate命令时出现此错误:

gem install minitest
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8

Could not open library 'libgtk-x11-2.0': dlopen(libgtk-x11-2.0, 13): image not found. 
Could not open library 'libgtk-x11-2.0.dylib': dlopen(libgtk-x11-2.0.dylib, 13): image not found.
Could not open library 'libgtk-x11-2.0.so.0': dlopen(libgtk-x11-2.0.so.0, 13): image not found.
Could not open library 'libgtk-x11-2.0.so.0.dylib': dlopen(libgtk-x11-2.0.so.0.dylib, 13): image not found.
Could not open library 'libgtk-x11-2.0.so': dlopen(libgtk-x11-2.0.so, 13): image not found.
Could not open library 'libgtk-x11-2.0.so.dylib': dlopen(libgtk-x11-2.0.so.dylib, 13): image not found.
Could not open library 'libgtk-3': dlopen(libgtk-3, 13): image not found.
Could not open library 'libgtk-3.dylib': dlopen(libgtk-3.dylib, 13): image not found.
Could not open library 'libgtk-3.so.0': dlopen(libgtk-3.so.0, 13): image not found.
Could not open library 'libgtk-3.so.0.dylib': dlopen(libgtk-3.so.0.dylib, 13): image not found.
Could not open library 'libgtk-3.so': dlopen(libgtk-3.so, 13): image not found.
Could not open library 'libgtk-3.so.dylib': dlopen(libgtk-3.so.dylib, 13): image not found

2 个解决方案

#1


3  

for RVM:

对于RVM:

rvm gemset pristine

for non RVM:

对于非RVM:

gem pristine nokogiri

#2


0  

Nokogiri tends to complain when your current version of libxml is different from the one it compiled against. That doesn't always cause it to blow up, however. May even be a red herring. I would remove nokogiri from gemfile and see if the error persists. If so, then I'd start removing other stuff. Googling your error message suggests it has to do with a gem that uses libnotify.

当你的当前版本的libxml与它编译的版本不同时,Nokogiri会抱怨。然而,这并不总是导致它爆炸。甚至可能是一个红鲱鱼。我会从gemfile中删除nokogiri并查看错误是否仍然存在。如果是这样,那我就开始删除其他东西了。谷歌搜索您的错误消息表明它与使用libnotify的gem有关。

Image Not Found Errors after Upgrade to Rails 3.1, how to fix? rake db:migrate error (Function 'inotify_init' not found)

升级到Rails 3.1后找不到映像错误,如何修复? rake db:migrate error(未找到函数'inotify_init')

#1


3  

for RVM:

对于RVM:

rvm gemset pristine

for non RVM:

对于非RVM:

gem pristine nokogiri

#2


0  

Nokogiri tends to complain when your current version of libxml is different from the one it compiled against. That doesn't always cause it to blow up, however. May even be a red herring. I would remove nokogiri from gemfile and see if the error persists. If so, then I'd start removing other stuff. Googling your error message suggests it has to do with a gem that uses libnotify.

当你的当前版本的libxml与它编译的版本不同时,Nokogiri会抱怨。然而,这并不总是导致它爆炸。甚至可能是一个红鲱鱼。我会从gemfile中删除nokogiri并查看错误是否仍然存在。如果是这样,那我就开始删除其他东西了。谷歌搜索您的错误消息表明它与使用libnotify的gem有关。

Image Not Found Errors after Upgrade to Rails 3.1, how to fix? rake db:migrate error (Function 'inotify_init' not found)

升级到Rails 3.1后找不到映像错误,如何修复? rake db:migrate error(未找到函数'inotify_init')