I am trying to use MiniMagick to resize images, and in my controller file I did the following:
require 'rubygems' require 'mini_magick'
and
img = MiniMagick::Image.open(file)
But when I call the controller,
LoadError (cannot load such file
I added the gem 'mini_magick' to my Gemfile, so I have no idea what is going on. Can someone help me with this?
BTW, it is available both in irb and rails console , but not when launched as a server.
thanks in advance.
Guanlun
source share