0

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>'
kibaekr
  • 1,319
  • 1
  • 21
  • 38

1 Answers1

2

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.

Community
  • 1
  • 1
Dave Satch
  • 1,161
  • 6
  • 12
  • have you tried "gem pristine rmagick". https://github.com/mroth/lolcommits/issues/9. I noticed you are using RVM, might be common sense but make sure you are in the correct environment before running :) – Dave Satch May 05 '14 at 06:56
  • Yes, so I tried reinstalled RVM, but now I am getting a different error. Can you clarify what you mean by checking whether I am in the right env? How would I do that? – kibaekr May 05 '14 at 09:29
  • also, this is the error I am getting now. I know it's because of my local settings because it works on staging server as well as my other developers' local machine: http://stackoverflow.com/questions/23469084/ruby-on-rails-no-implicit-conversion-of-array-into-string – kibaekr May 05 '14 at 09:29
  • I've added a comment to your other post. Once the other issue is resolved comment here again if I can help you further with the RMajick issue. – Dave Satch May 06 '14 at 00:27
  • I was able to resolve everything - thank you for your help! I have accepted your answer. I would also add to your answer that I was able to resolve the rmagick issue by reinstalling RVM. (I believe that was what did it, but can't be 100% sure.. I also had ruby installed through benv as well as rvm) – kibaekr May 06 '14 at 00:31