Forum: Ruby on Rails Using ImageMagick with Locomotive

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B07c187ac858535358faa9365b66e657?d=identicon&s=25 John Tsombakos (Guest)
on 2006-03-23 21:59
(Received via mailing list)
Hi,

I'm trying to use the routines on this page:

<http://addictedtonew.com/archives/127/rotating-ima...

to try and rotate some images.

I tried using the script/console to do some testing, - I know
ImageMagick is working, as I'm using the filecolumn plugin to resize
images as they are loaded. When I try, using the console, to rotate an
image, I get an error on this line:

image   = Magick::ImageList.new(photo.file)

(substituting the correct field of my database, of course)

The error is:

Magick::ImageMagickError: NoDecodeDelegateForThisImageFormat
`/Users/john/Desktop/TeamTracker/public/team/image/3/DSC_2806.jpg':

I did see some info about setting the MAGICK_HOME environment
variable, and I tried setting it to what I thought would be right, but
I still get the error.

Anyone have any hints? Any settings I need to make?

Thanks!

jt
B07c187ac858535358faa9365b66e657?d=identicon&s=25 John Tsombakos (Guest)
on 2006-03-28 16:15
(Received via mailing list)
On 3/23/06, John Tsombakos <johnt519@gmail.com> wrote:
> Hi,
>
> I'm trying to use the routines on this page:
>
> <http://addictedtonew.com/archives/127/rotating-ima...
>
> to try and rotate some images.

Just for completeness, and to add to the list archives for future
questions:

Add these lines to your environment.rb file:

ENV["MAGICK_CODER_MODULE_PATH"]=
/Applications/Locomotive/Bundles/
rails-0.14.3-max.bundle/Contents/Resources/ports/lib/
ImageMagick-6.2.4/modules-Q16/coders"

ENV["MAGICK_CONFIGURE_PATH"]= "/Applications/Locomotive/Bundles/
rails-0.14.3-max.bundle/Contents/Resources/ports/lib/
ImageMagick-6.2.4/config:/Applications/Locomotive/Bundles/
rails-0.14.3-max.bundle/Contents/Resources/ports/share/
ImageMagick-6.2.4/config"

ENV["GS_FONTPATH"] = "/usr/lib/X11/fonts/Type1:/usr/lib/X11/fonts/TTF"

ENV["GS_LIB"] =  "/Applications/Locomotive/Bundles/rails-0.14.3-
max.bundle/Contents/Resources/ports/share/ghostscript/8.51/lib:/
Applications/Locomotive/Bundles/rails-0.14.3-max.bundle/Contents/
Resources/ports/share/ghostscript/fonts"

obviously, replacing the paths as appropriate.

Hope this helps someone.
This topic is locked and can not be replied to.