[Kde-bindings] QtRuby: Init_qtruby4 not called

Richard Dale rdale at foton.es
Sun Sep 16 14:56:38 UTC 2007


On Sunday 16 September 2007, Arno Rehn wrote:
> Hi,
>
> as qyoto is can now completely cope with a modular smoke, I tried to port
> qtruby4, too. But I can't even start a tutorial, I get the following error:
That would be really good - I must try and help you out. I haven't done a lot 
recently as I've had back and arm trouble and have been trying to avoid 
typing too much.

> /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2561:in `initialize': undefined
> method `addMetaObjectMethods' for Qt::Internal:Module (NoMethodError)
>         from /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:48:in `new'
>         from /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:48:in `signals'
>         from ./lcdrange.rb:3
>         from ./gamebrd.rb:1:in `require'
>         from ./gamebrd.rb:1
>         from t14.rb:5:in `require'
>         from t14.rb:5
>
> It seems to me as if Init_qtruby4 is never called. I don't know very much
> about ruby, so how is it supposed to be called?
In your qtruby program there should be a require 

require 'Qt'

That will load 'Qt.rb' in the top level /usr/lib64/ruby/site_ruby/1.8/ 
directory. That should then load the C extension 'qtruby4.so' with the 
Init_qtruby4() call in it, and inside that function there is an rb_require() 
call to load the 'Qt/qtruby4.rb' source in turn.

-- Richard





More information about the Kde-bindings mailing list