ruby-on-rails – 升级到Rails 3.1后图像找不到错误,如何解决?

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 升级到Rails 3.1后图像找不到错误,如何解决?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
每当我从rails 3.0升级到rails 3.1后,我每次加载rails服务器时都会收到此警告.不确定它是什么.我已经尝试重新安装从rvm和ruby到我所有宝石的所有东西.我的猜测是rails 3.1中不支持某些gem,但我似乎无法找到哪一个或由于某种原因我没有为特定gem安装依赖项.
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

解决方法

这来自在OSX上使用libnotify gem.
您可以通过在Gemfile中指定操作系统来避免这种情况,如下所示:
gem 'libnotify' if /linux/ =~ RUBY_PLATFORM
gem 'growl' if /darwin/ =~ RUBY_PLATFORM
原文链接:https://www.f2er.com/ruby/274314.html

猜你在找的Ruby相关文章