rmagick problem?

R

Roeland Moors

I have a simple but wierd problem.

this is my simple program:

require 'RMagick'
img = Magick::ImageList.new("dsc01748.jpg")

dsc01748.jpg is an image in the current path.
After running it, this is the error:

#ruby ./test.rb
/usr/lib/ruby/1.8/RMagick.rb:1377:in `read': unable to open image `1748.jpg': No such file or directory: (Magick::ImageMagickError)
from /usr/lib/ruby/1.8/RMagick.rb:1377:in `initialize'
from /usr/lib/ruby/1.8/RMagick.rb:1376:in `each'
from /usr/lib/ruby/1.8/RMagick.rb:1376:in `initialize'
from ./test.rb:3:in `new'
from ./test.rb:3

This used to work just fine, I also tested an older version of rmagick.
Is there something changed in ruby?

I can't figure it out, what am I missing?
 
R

Roeland Moors

I have a simple but wierd problem.

this is my simple program:

require 'RMagick'
img = Magick::ImageList.new("dsc01748.jpg")

The 4 first characters are just ignored!
this works:
img = Magick::ImageList.new("1234dsc01748.jpg")
dsc01748.jpg is an image in the current path.
After running it, this is the error:

#ruby ./test.rb
/usr/lib/ruby/1.8/RMagick.rb:1377:in `read': unable to open image `1748.jpg': No such file or directory: (Magick::ImageMagickError)
from /usr/lib/ruby/1.8/RMagick.rb:1377:in `initialize'
from /usr/lib/ruby/1.8/RMagick.rb:1376:in `each'
from /usr/lib/ruby/1.8/RMagick.rb:1376:in `initialize'
from ./test.rb:3:in `new'
from ./test.rb:3

This used to work just fine, I also tested an older version of rmagick.
Is there something changed in ruby?

I can't figure it out, what am I missing?

I did a debian upgrade today, could that cause the problem. A new
library or something?
 
T

ts

R> I did a debian upgrade today, could that cause the problem. A new
R> library or something?

You have a problem with your installation

svg% ls dsc01748.jpg
dsc01748.jpg
svg%

svg% ruby -rRMagick -e 'p Magick::ImageList.new("dsc01748.jpg")'
[dsc01748.jpg JPEG 480x480 DirectClass 8-bit 28716b]
scene=0
svg%

try to rebuild RMagick


Guy Decoux
 
T

Tim Hunter

ts said:
R> I did a debian upgrade today, could that cause the problem. A new
R> library or something?

You have a problem with your installation

svg% ls dsc01748.jpg
dsc01748.jpg
svg%

svg% ruby -rRMagick -e 'p Magick::ImageList.new("dsc01748.jpg")'
[dsc01748.jpg JPEG 480x480 DirectClass 8-bit 28716b]
scene=0
svg%

try to rebuild RMagick


Guy Decoux

Guy is right as usual. Looks like that Debian upgrade left you with a newer
version of ImageMagick than the one that RMagick was built with. Re-build
RMagick, starting with ./configure. (Hmmmm...make sure your RMagick
supports the new ImageMagick. RMagick 1.6.0 is the latest version of
RMagick.)

Let me know if this doesn't do the trick.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top