ruby-on-rails – rmagick阻止rails服务器工作

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – rmagick阻止rails服务器工作前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我必须使用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>'

解决方法

我能够修复此错误,因此如果他们遇到同样的问题,这应该适用于其他任何人.

以下是修复的步骤:

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服务器,我不会收到更多错误.希望这有助于某人!

原文链接:https://www.f2er.com/ruby/268694.html

猜你在找的Ruby相关文章