Help getting RMagick working

Discussion in 'Ruby' started by pjhyett@gmail.com, Jun 6, 2005.

  1. Guest

    I've tried everything to get RMagick working on my iBook. I'm running
    OS X 10.4.1, rather than tell you everything I've tried that doesn't
    work, I was wondering if someone had a working copy on their Mac, if
    they could just walk me through the steps they took to make it work on
    their machine? The error I'm getting is:

    /usr/bin/ruby -I /Users/pj/Desktop/RMagick-1.8.1/lib -I
    /Users/pj/Desktop/RMagick-1.8.1/ext/RMagick Adispatch.rb (example 1 of
    178)
    Adispatch.rb:4:in `read': no decode delegate for this image format
    `images/Flower_Hat.jpg': (Magick::ImageMagickError)
    from Adispatch.rb:4
    post-setup.rb: Adispatch.rb example returned error code 256
     
    , Jun 6, 2005
    #1
    1. Advertising

  2. wrote:
    > I've tried everything to get RMagick working on my iBook. I'm running
    > OS X 10.4.1, rather than tell you everything I've tried that doesn't
    > work, I was wondering if someone had a working copy on their Mac, if
    > they could just walk me through the steps they took to make it work on
    > their machine? The error I'm getting is:
    >
    > /usr/bin/ruby -I /Users/pj/Desktop/RMagick-1.8.1/lib -I
    > /Users/pj/Desktop/RMagick-1.8.1/ext/RMagick Adispatch.rb (example 1 of
    > 178)
    > Adispatch.rb:4:in `read': no decode delegate for this image format
    > `images/Flower_Hat.jpg': (Magick::ImageMagickError)
    > from Adispatch.rb:4
    > post-setup.rb: Adispatch.rb example returned error code 256
    >


    Sorry you're having trouble.

    There's a file in your RMagick install directory called
    README-Mac-OSX.txt. This is an description for installing ImageMagick or
    GraphicsMagick and RMagick on Tiger.

    If you still have trouble with the install email me at
    or start a thread in RMagick's Help Forum on
    RubyForge.
     
    Timothy Hunter, Jun 6, 2005
    #2
    1. Advertising

  3. Guest

    I went through the textfile and was able to get RMagick to make
    thumbnails again! The only problem is it fails a bunch of the post
    install tests.

    They all pretty much look like this:
    post-setup.rb: setting up documentation...
    /usr/bin/ruby -I /Users/pj/Desktop/RMagick-1.8.1/lib -I
    /Users/pj/Desktop/RMagick-1.8.1/ext/RMagick InitialCoords.rb
    /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/misc.rb:320:in `render':
    undefined method `width' for nil:NilClass (NoMethodError)
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/misc.rb:688:in
    `text'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/text.rb:64:in
    `add_primitives'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/container.rb:71:in
    `add_primitives'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/container.rb:71:in
    `each'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/container.rb:71:in
    `add_primitives'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/rvg.rb:262:in
    `add_outermost_primitives'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/rvg.rb:262:in
    `each'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/rvg.rb:262:in
    `add_outermost_primitives'
    from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/rvg.rb:235:in
    `draw'
    from InitialCoords.rb:23
    post-setup.rb: InitialCoords.rb example returned error code 256
     
    , Jun 7, 2005
    #3
  4. wrote:
    > I went through the textfile and was able to get RMagick to make
    > thumbnails again! The only problem is it fails a bunch of the post
    > install tests.
    >
    > They all pretty much look like this:
    > post-setup.rb: setting up documentation...
    > /usr/bin/ruby -I /Users/pj/Desktop/RMagick-1.8.1/lib -I
    > /Users/pj/Desktop/RMagick-1.8.1/ext/RMagick InitialCoords.rb
    > /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/misc.rb:320:in `render':
    > undefined method `width' for nil:NilClass (NoMethodError)
    > from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/misc.rb:688:in
    > `text'


    Looks like a problem with the font configuration. Try this:

    Go to /opt/local/lib/ImageMagick-6.x.y/config, where 6.x.y is the actual
    version number of ImageMagick you installed.

    Open the file type.xml in a text editor. It should look like this:

    <?xml version="1.0"?>
    <typemap>
    <include file="type-ghostscript.xml" />
    </typemap>

    Then edit the type-ghostscript.xml file in the same directory. You
    should see a lot of entries that look like this:

    <type
    name="AvantGarde-Book"
    fullname="AvantGarde Book"
    family="AvantGarde"
    foundry="URW"
    weight="400"
    style="normal"
    stretch="normal"
    format="type1"
    metrics="/opt/local/share/ghostscript/fonts/a010013l.afm"
    glyphs="/opt/local/share/ghostscript/fonts/a010013l.pfb"
    />

    Make sure that the directory shown in the "metrics" attribute exists on
    your system and that it actually contains the specified files.

    The /opt/local/share/directory/ghostscript/fonts directory is created
    when you install X11. You have to specify this directory with the
    --with-gs-font-dir= option when you configure ImageMagick.

    If the metrics and glyphs attributes have the wrong directory then you
    can either re-build and re-install ImageMagick, specifying the correct
    directory, or you can just edit the type-ghostscript.xml file yourself
    (if you're comfortable with that).

    If you don't have the fonts on your system at all then you need to
    install X11.

    If the fonts are present and the type-ghostscript.xml file has the right
    directory then something else is wrong.

    Let me know either way. Good luck!

    Background: ImageMagick/GraphicsMagick doesn't search your system for
    fonts during the installation process. It just assumes that you have a
    predefined (common) set of fonts. All you can do is tell it where these
    fonts are at. If you don't have those fonts then you get errors at run-time.
     
    Timothy Hunter, Jun 7, 2005
    #4
  5. Guest

    Thanks a bunch Tim! Everything is a-okay now. BTW, the X11 download
    link in the MacOS readme is broken. I found the source at the
    developers site and just compiled it the old fashioned way.

    -PJ
     
    , Jun 7, 2005
    #5
  6. wrote:
    > Thanks a bunch Tim! Everything is a-okay now. BTW, the X11 download
    > link in the MacOS readme is broken. I found the source at the
    > developers site and just compiled it the old fashioned way.
    >
    > -PJ
    >


    Thanks for pointing this out, PJ. I see from this page
    http://developer.apple.com/darwin/runningX11.html that X11 is available
    on the Tiger install disk. I'll update the README.

    Glad to know that everything is up and running for you now.
     
    Timothy Hunter, Jun 7, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Timothy Hunter

    Email to rmagick working now

    Timothy Hunter, Feb 28, 2005, in forum: Ruby
    Replies:
    0
    Views:
    78
    Timothy Hunter
    Feb 28, 2005
  2. Timothy Hunter
    Replies:
    0
    Views:
    141
    Timothy Hunter
    Dec 30, 2006
  3. Victor Reyes
    Replies:
    6
    Views:
    147
    Victor Reyes
    Jan 21, 2008
  4. Cameron Barrie
    Replies:
    0
    Views:
    81
    Cameron Barrie
    Jan 24, 2008
  5. Pito Salas
    Replies:
    1
    Views:
    143
    Tim Hunter
    Apr 24, 2009
Loading...

Share This Page