Sergey Prishak
Sergey Prishak

Reputation: 300

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.

Upvotes: 8

Views: 18933

Answers (5)

Aleksandar Pavić
Aleksandar Pavić

Reputation: 3420

When running bundle for an application like Redmine, gem might be optional, so you must include it like:

bundle install --with rmagick

Considering that it exists in your Gemfile, it should look something like:

  group :rmagick do
    gem "rmagick", "~> 2.16.0"
  end

Upvotes: 0

Collin B
Collin B

Reputation: 51

For anyone reading this now, I was having issues installing libmagick9-dev(it appears to have been replaced).

I ran the following and it installed successfully:

sudo apt-get install libmagickcore-dev
sudo apt-get install graphicsmagick-libmagick-dev-compat
sudo apt-get install libmagickwand-dev
sudo apt-get install imagemagick
gem install rmagick

Cheers

Upvotes: 2

Chris Owens
Chris Owens

Reputation: 5286

For those using Heroku:

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

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

require 'RMagick'

Upvotes: 3

fl00r
fl00r

Reputation: 83680

add

gem 'RMagick'

or

gem "rmagick", "~> 2.13.1"

to your Gemfile and then run

bundle

Upvotes: 15

Gurudath BN
Gurudath BN

Reputation: 1411

install

apt-get install libmagick9-dev 

first

Upvotes: 5

Related Questions