Question

I updated my osx to Mavericks 10.9 from 10.7, and since then I have been having issues running 'rails s'.

The issue is with Rmagick, and I have tried almost every solution that I could find. Most people recommended reinstalling imagemagick through homebrew, and reinstalling rmagick gem, but that didn't work. I even uninstalled homebrew as a whole, and reinstalled it. I tried getting rid of gemfile.lock, and running bundle install again, but none of these worked.

Here is the error message I get when I try running the rails local server:

Kibaeks-MacBook-Pro:onvard_saas kibaek$ rails s
/Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/gems/rmagick-2.13.2/lib/rmagick.rb:11:in `require': dlopen(/Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/extensions/x86_64-darwin-12/2.1.0-static/rmagick-2.13.2/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libMagickCore.5.dylib (LoadError)
Referenced from: /Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/extensions/x86_64-darwin-12/2.1.0-static/rmagick-2.13.2/RMagick2.bundle
Reason: image not found - /Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/extensions/x86_64-darwin-12/2.1.0-static/rmagick-2.13.2/RMagick2.bundle
from /Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/gems/rmagick-2.13.2/lib/rmagick.rb:11:in `<top (required)>'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
from /Users/kibaek/onvard_saas/config/application.rb:13:in `<top (required)>'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/gems/railties-3.2.16/lib/rails/commands.rb:53:in `require'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/gems/railties-3.2.16/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/gems/railties-3.2.16/lib/rails/commands.rb:50:in `tap'
from /Users/kibaek/.rvm/gems/ruby-2.1.0@onvard/gems/railties-3.2.16/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Was it helpful?

Solution

I had trouble with this as well on OS 10.9. I tried many things and this is what worked for me (after installing Xcode 5):

brew install libtool --universal
brew link libtool

Quick research just found the following with other users who also had success:

Stack Overflow: rmagick-error-after-installing-os-x-mavericks

TheKUnit Blog: RMagick errors running rake tasks os x maverick

Edit: Another possibility is that you have a different version of RMagick than the gem is looking for (possibly from the reinstall). Your log shows your gem is looking for /usr/local/lib/libMagickCore.5.dylib which I am guessing it cannot find. Do

 ls /usr/local/lib/

and see if you can find that file. If not, a

gem pristine rmagick

may help if you haven't already tried it. In my case I have Core 6 in that folder and not 5.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top