Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Help getting RMagick working

Reply
Thread Tools

Help getting RMagick working

 
 
pjhyett@gmail.com
Guest
Posts: n/a
 
      06-06-2005
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
17
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

 
Reply With Quote
 
 
 
 
Timothy Hunter
Guest
Posts: n/a
 
      06-06-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
> 17
> 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
(E-Mail Removed) or start a thread in RMagick's Help Forum on
RubyForge.


 
Reply With Quote
 
 
 
 
pjhyett@gmail.com
Guest
Posts: n/a
 
      06-07-2005
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

 
Reply With Quote
 
Timothy Hunter
Guest
Posts: n/a
 
      06-07-2005
(E-Mail Removed) 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.
 
Reply With Quote
 
pjhyett@gmail.com
Guest
Posts: n/a
 
      06-07-2005
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

 
Reply With Quote
 
Timothy Hunter
Guest
Posts: n/a
 
      06-07-2005
(E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between gem install rmagick and port rb-rmagick Pito Salas Ruby 1 04-24-2009 09:29 PM
RMagick error: " no such file to load -- RMagick" jeljer te Wies Ruby 2 03-23-2009 12:23 AM
Need help designing a pair of RMagick methods Timothy Hunter Ruby 0 12-30-2006 08:00 PM
RMagick build error...please help Frioffol Friofool Ruby 1 11-21-2006 05:40 PM
Email to rmagick working now Timothy Hunter Ruby 0 02-28-2005 10:59 PM



Advertisments