Πέμπτη, Μαΐου 27, 2010

RMagick with Rails

I was trying to use the rmagick plugin in my Ruby on Rails app the other day, and kept getting this error when starting the server:
 no such file to load -- rmagick
while I had the rmagick plugin installed.

After taking a look in  /var/lib/gems/1.8/gems/rmagick-2.13.1/lib, I realized that the library file was called 'RMagick2.so'! So, you must add
config.gem 'rmagick', :lib => 'RMagick2'
to your config/enviroment.rb. It does not work without the :lib option!

Hope it helps!



Δεν υπάρχουν σχόλια: