I have a file rmg.rb: require ''RMagick'' include Magick cat = ImageList.new("prod.jpg") cat.display exit The file prod.jpg is in the same directory as this file above. I execute the following: ruby rmg.rb I get the following output: /usr/lib/ruby/1.8/RMagick.rb:1377:in `read'': unable to open image `'': 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 `initialize'' from rmg.rb:4 Any ideas as to what I am missing? -Thanks. -- Posted via http://www.ruby-forum.com/.
Mufaddal Khumri wrote:> I have a file rmg.rb: > > require ''RMagick'' > include Magick > > cat = ImageList.new("prod.jpg") > cat.display > exit > > The file prod.jpg is in the same directory as this file above. > > I execute the following: > > ruby rmg.rb > > I get the following output: > > /usr/lib/ruby/1.8/RMagick.rb:1377:in `read'': unable to open image `'': 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 `initialize'' > from rmg.rb:4 > > Any ideas as to what I am missing?I am running this on Ubuntu. ruby version 1.8.4. I installed imagemagick, libmagick-ruby, libmagick-ruby1.8. I tried to run the above rmg.rb in this environment and got the exception. Do I have to do a - gem install rmagick? <--- When I try doing this I get a trace like such: configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target Configuring RMagick 1.10.1 checking for install-gcc... no checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ruby... /usr/bin/ruby checking for Magick-config... no checking for GraphicsMagick-config... no configure: error: Can''t install RMagick. Can''t find Magick-config or GraphicsMagick-config program. I am at a loss here and would really love some pointers. -Thanks.> > -Thanks.-- Posted via http://www.ruby-forum.com/.
Mufaddal Khumri wrote:> I am running this on Ubuntu. ruby version 1.8.4.configure: error: Can''t install RMagick. Can''t find Magick-config or> GraphicsMagick-config program.The last I heard the RMagick package on Ubuntu was broken in a way that produces exactly the "unable to open image `''" symptom you described. Norman Timmler blogs about how to get around that problem here: http://blog.inlet-media.de/rmagick-does-not-play-well-on-ubuntu When the RMagick install reports that it can''t find Magick-config or GraphicsMagick-config that usually means that you need to install the ImageMagick "development" package that contains the library header files. This must be the libmagick6-dev package that Mr. Timmler mentions. You can always install ImageMagick from source. Here''s the RMagick install FAQ: http://rmagick.rubyforge.org/install-faq.html. I''d really like to help you get up and running. If you can''t make any progress drop me a line at rmagick@rubyforge.org. -- Posted via http://www.ruby-forum.com/.
Mufaddal Khumri wrote:> I followed the instructions at: > <http://blog.inlet-media.de/rmagick-does-not-play-well-on-ubuntu> > > I got the following two problems in the logs (Look like i needed > something for two of the example scripts): > ... > drawcomp.rb: ImageMagickError - Delegate failed `"wmf2eps" -o "%o" > "%i"'': > ... > stegano.rb: ImageMagickError - Delegate failed `"wmf2eps" -o "%o" "%i"'': > ... > > The rmagick gem installed fine and my example worked!. > > -Thank you for your help. >Looks like ImageMagick is looking for wmf2eps. If you don''t need support for WMF that''s okay. Glad you''re up and running! -- Posted via http://www.ruby-forum.com/.