SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast zfade3's Avatar
    Join Date
    Jul 2005
    Location
    Endor
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rails, RMagick, and Windows - please help

    Hi Ruby experts,

    I'm working on some code to resize an image in my web app. My hosting provider has support for RMagick, so I've decided to use that library. I am developing the app on my Windows XP machine, running Apache with FastCGi.

    I created an RMagick script that runs fine from the command prompt. When I try to require 'RMagick' from inside my Model class, I get a nasty error:

    The specified module could not be found. - C:/path-to-ruby/lib/ruby/gems/1.8/gems/rmagick-1.14.1-win32/ext/RMagick.so
    RMagick documentation states that this error is NOT in fact a missing RMagick.so (which exists in that location), but a dependent ImageMagick library.

    In the windows install, it added the ImageMagick directory to my system's PATH, which fixed an identical error that was previously happening from my command prompt script. However, I don't know how to do a similar thing, adding the ImageMagick directory to a rails path of some sort.

    Can someone please help me out on this?

    Thanks in advance.
    --
    Jimmy

  2. #2
    SitePoint Enthusiast zfade3's Avatar
    Join Date
    Jul 2005
    Location
    Endor
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I solved my own problem, but thanks for reading my problem.

    I used Process Monitor (newer version of Filemon) to monitor where ruby was looking for the missing .dll files. I moved the ImageMagick CORE_*.dlls to my ruby/bin/ directory (I know this isn't the best thing to do, but hey!).

    It now works perfectly. Hope this helps someone else down the road.

    --
    Jimmy

  3. #3
    SitePoint Guru Majglow's Avatar
    Join Date
    Aug 1999
    Location
    B-Town
    Posts
    645
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Odds are, you shouldn't use RMagick in your rails application as it will cause memory problems. I know that a decent solution for resizing images is using ImageMagick's convert tool, but that works on *nix.
    Ohai!

  4. #4
    SitePoint Member
    Join Date
    Nov 2006
    Location
    Austin, TX
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Majglow View Post
    Odds are, you shouldn't use RMagick in your rails application as it will cause memory problems. I know that a decent solution for resizing images is using ImageMagick's convert tool, but that works on *nix.
    It works fine on windows too, and it's called mini-magick

    http://rubyforge.org/projects/mini-magick/
    wtf242
    ProgrammingBooks.org - Programming Books Ranked by Programmers
    Turn of the Crank - My blog
    Robot Walrus - My Art Prints/Posters Blog


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •