Rmagick prevents rails server

I need to use rmagick and this does not allow me to start the rails server. I read here and Google, none of the solutions have helped so far. Something is wrong in the library, and I'm not sure how to fix it.

If anyone has recommendations for fixing this exact problem that would be much appreciated.

/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>' 
+7
source share
4 answers

I was able to fix this error, so this should work for someone else if they have the exact same problem.

Here are the repair steps:

 brew uninstall imagemagick gem uninstall rmagick sudo gem install json # (not sure this step is needed) sudo apt-get install libmagick9-dev bundle install 

And then it works fine. Now I can start the rails server and I am not getting any more errors. Hope this helps someone!

+12
source

You just need to reinstall rmagick with your current imagemagick

 gem install rmagick 

In some problems, I found the following fix for the problem using

 gem pristine rmagick 
+4
source

I had a few problems with my installation, which worked for me

 brew uninstall imagemagick gem uninstall rmagick brew install imagemagick bundle install brew unlink libtool brew link libtool 

without the first I got errors trying to install rmagick and without the last two there were errors starting from the rails server

+2
source

I also had this problem. I tried many different tricks, and, oddly enough, this oddity worked. The first 2 teams seem useless, but given that I don’t know how this worked, I leave them too.

Don't ask questions, just run them and hug rmagick

 brew install libtool --universal brew link libtool brew unlink libtool && brew link libtool gem uninstall rmagick gem install rmagick 
0
source

All Articles