Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no such file to load -- RMagick2.so

I am really struggling to understand the meaning of the error below. I develop on OS X Lion, and I have RMagick installed there, and my code works flawlessly.

Yet on the production RedHat machine, the below:

MissingSourceFile (no such file to load -- RMagick2.so):
  rmagick (2.13.1) [v] lib/RMagick.rb:11

Yes, I installed the rmagick gem locally to both machines. And I have unpacked the gem on each machine to vendor/gems.

What is probably the funniest to me is that this error is so stupid. There's not an RMagick.so file on my Mac either, but the code works.

What is the problem here?

like image 250
AKWF Avatar asked Aug 24 '11 00:08

AKWF


3 Answers

So I removed this gem from vendor/gems, because unpacking it evidently misses the dynamic library.

Then I created a new file:

/etc/ld.so.conf.d/local.conf

and put this in there:

/usr/lib
/usr/local/lib

And now it is working.

like image 147
AKWF Avatar answered Nov 07 '22 08:11

AKWF


Just had the same problem after upgrading OS X Lion to Mountain Lion. rmagick gem was installed fine, as was imagemagick. I had to uninstall both, then reinstall to fix it.

gem uninstall rmagick
brew uninstall imagemagick
brew install imagemagick
bundle install

Of course, prior to that I had to install XCode command line tools to get git and gcc back so I could brew and make again.

like image 3
joseph.hainline Avatar answered Nov 07 '22 09:11

joseph.hainline


I also have the problem like your, you can visit Link and use this way to install to your OS X Lion, it is work for me now.

like image 3
aidai524 Avatar answered Nov 07 '22 08:11

aidai524