1
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Could not find gem 'rmagick v 2.13.1 (>= 0) x86-mingw32' in the gems available o
n this machine.

Hi I am getting message when I run bundle install below is my gemsfile

source 'https://rubygems.org'

gem 'rails', '3.2.6'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

gem 'carrierwave'
gem 'rmagick v 2.13.1'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
 gem 'sass-rails',    '~> 3.2.3'
gem 'coffee-rails',  '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby

gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
 gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
 # gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

 # To use debugger
# gem 'debugger'

gem 'will_paginate','~> 3.0'

Is there another way to install the the RMagick gem in Rails 3? I installed carrierwave and need to use rmagick with it. Can I use carrierwave without rmagick?

user1014888
  • 431
  • 2
  • 7
  • 14

4 Answers4

5

You need to alter your Gemfile a little bit.

gem 'rmagick', '2.13.1'

You also need to install imagemagick on your system. rmagick requires imagemagick

You can install via yum, apt-get or whatever package manager your OS uses.

One note is that installing imagemagick on OSX is a little tricky. I recommend using homebrew

brew install -f imagemagick --disable-openmp
Kyle
  • 21,978
  • 2
  • 60
  • 61
  • I am using Windows 7 with Rails 3.2.9, whats the best way about going to install I only know how to add the name of a gem to Gemfile and then run bundle install, I just want to be able to upload a file to a model and resize it. – user1014888 Jan 18 '13 at 15:09
  • @user1014888 see [this link](http://www.imagemagick.org/script/binary-releases.php#windows) – Kyle Jan 18 '13 at 15:12
  • Ok thanks, once I install the exe file how do I reference it from my Rails app? – user1014888 Jan 18 '13 at 15:21
  • You should not need to. The `rmagick` gem should pick up the location of the library on your system. – Kyle Jan 18 '13 at 15:22
  • Ok cheers will give it a go, so Rmagick should work after installing the ImageMagick.exe file? – user1014888 Jan 18 '13 at 15:23
2

The line in your Gemfile should be:

gem "rmagick", "~> 2.13.1"

Also, I would recommend using mini_magick instead as it takes less memory when processing:

gem "mini_magick", "~> 3.4"

Can I use carrierwave without rmagick?

Yes, but you will not be able to do image processing (resizing etc.). Uploading will work just fine.

Jiří Pospíšil
  • 14,296
  • 2
  • 41
  • 52
  • I get this error when trying to install rmagick the way you recommended, Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/rmagick-2 .13.1 for inspection. Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick /gem_make.out An error occurred while installing rmagick (2.13.1), and Bundler cannot continue . Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling. – user1014888 Jan 18 '13 at 15:16
0

Found a great answer from Stackoverflow. Worked for me. Can work for you.

cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
ln -s libMagick++-Q16.7.dylib libMagick++.dylib
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib

Error installing Rmagick on Mountain Lion

Community
  • 1
  • 1
jmoon90
  • 339
  • 4
  • 17
0
gem 'mini_magick', '~> 4.8'

bundle
Heartless Vayne
  • 904
  • 1
  • 8
  • 18