Problem using png_outputter

54 views
Skip to first unread message

Doug

unread,
Jul 19, 2009, 3:35:32 PM7/19/09
to Barby
Hi,

I'm new to Ruby and Barby (I'm trying to switch from Perl) and am
having a problem creating a png barcode image.

I'm using the Linux OS and have installed Ruby 1.8.7. I've also
installed, via gem, png, Barby and inline but I'm getting an error
when I try to create a simple png barcode (using the code suggested in
the Home page of Barby). I get the same error when I try and create a
simple png image using the code suggested in the png ri doc.

The error that I'm getting is:-

/home/dconran/.gem/ruby/1.8/gems/png-1.2.0/lib/png.rb:47:
uninitialized constant String::CompilationError (NameError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
from ./t3.rb:3


I've tried commenting out all occurrences of CompilationError
(probably not a good idea!) and then get the following error:-

/home/dconran/.gem/ruby/1.8/gems/png-1.2.0/lib/png.rb:14: undefined
method `inline' for String:Class (NoMethodError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
from ./t3.rb:3

I'm sure that I just haven't done something - but what?

Can anyone help me?

TIA

Doug

Tore Darell

unread,
Jul 20, 2009, 5:28:44 AM7/20/09
to Barby
Hi Doug,

This sounds like it's a problem with your RubyInline installation, but
I'm not sure what it could be.. Do you have a C compiler installed? A
quick google leads me to http://www.macruby.org/trac/wiki/Troubleshooting
which is for OS X, but suggests it can be solved by upgrading
RubyInline to a later version..

Tore

Doug

unread,
Jul 21, 2009, 4:41:00 PM7/21/09
to Barby
Tore,

Thanks for your response. In fact, browsing around in the area of
Rubyinline I saw some mentions of png and loaded an earlier version
(1.1.0) of that instead of png-1.2.0. That seems to have fixed the
problem.

I have another question but I'll raise a new thread for that.

Many thanks for your help

Doug


On Jul 20, 10:28 am, Tore Darell <toredar...@gmail.com> wrote:
> Hi Doug,
>
> This sounds like it's a problem with your RubyInline installation, but
> I'm not sure what it could be.. Do you have a C compiler installed? A
> quick google leads me tohttp://www.macruby.org/trac/wiki/Troubleshooting
Reply all
Reply to author
Forward
0 new messages