我必须使用rmagick,它不允许我启动rails服务器。我在这里和谷歌上读过,到目前为止还没有一个解决方案有帮助。库出了点问题,我不确定该如何修复它。
如果有人有解决这个问题的建议,我们将不胜感激。
/Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/rmagick-2.13.2/lib/rmagick.rb:11:in `require': dlopen(/Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/rmagick-2.13.2/lib/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libltdl.7.dylib (LoadError)
Referenced from: /usr/local/lib/libMagickCore-Q16.7.dylib
Reason: image not found - /Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/rmagick-2.13.2/lib/RMagick2.bundle
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/rmagick-2.13.2/lib/rmagick.rb:11:in `<top (required)>'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `require'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `each'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `block in require'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `each'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `require'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.0/lib/bundler.rb:132:in `require'
from /Users/lexi87/dating/config/application.rb:7:in `<top (required)>'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:53:in `require'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
发布于 2013-03-02 03:31:36
我能够修复这个错误,所以如果他们有相同的问题,这应该适用于其他任何人。
以下是修复步骤:
brew uninstall imagemagick
gem uninstall rmagick
sudo gem install json # (not sure this step is needed)
sudo apt-get install libmagick9-dev
bundle install
然后它就完美地工作了。现在,我可以启动rails服务器,并且不会再收到错误。希望这对某些人有帮助!
发布于 2013-03-02 00:39:42
你只需要用你当前的imagemagick重新安装rmagick
gem install rmagick
在其他一些问题中,我发现以下问题通过使用解决了这个问题,
gem pristine rmagick
发布于 2014-11-20 22:33:01
我的安装有几个问题,对我有效的是
brew uninstall imagemagick
gem uninstall rmagick
brew install imagemagick
bundle install
brew unlink libtool
brew link libtool
如果没有前两个命令,我在尝试安装rmagick时会遇到错误,如果没有后两个命令,启动rails服务器时也会出现错误
https://stackoverflow.com/questions/15162496
复制相似问题