Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How fix error "no such file to load -- RMagick"?

After upgrading to Rails 3.0 Library rmagick longer be detected. Here is my setup:

Ubuntu server 10.4
gem 1.7.2
ruby 1.9.1
rails 3.0.7
rmagick-2.13.1

In irb can include library:

irb(main):002:0> require 'RMagick'
=> true

In rails 2 rmagick is available.

like image 594
Sergey Prishak Avatar asked Apr 23 '11 11:04

Sergey Prishak


3 Answers

add

gem 'RMagick'

or

gem "rmagick", "~> 2.13.1"

to your Gemfile and then run

bundle
like image 107
fl00r Avatar answered Sep 29 '22 16:09

fl00r


install

apt-get install libmagick9-dev 

first

like image 20
Gurudath BN Avatar answered Sep 29 '22 15:09

Gurudath BN


For those using Heroku:

gem "rmagick", "~>2.13.2", :require => 'RMagick'

Also, include the following wherever you're using it:

require 'RMagick'
like image 40
Chris Owens Avatar answered Sep 29 '22 15:09

Chris Owens