[Kde-bindings] Cannot execute the Qt4-Ruby dbus-examples

Richard Dale rdale at foton.es
Tue Nov 14 18:45:26 UTC 2006


Hi Carsten

On Tuesday 14 November 2006 17:19, Carsten Niehaus wrote:
> Moin moin
>
> I am using the latest svn of the ruby-bindings. All D-Bus examples fail
> with messages like:
>
> carsten at helium:~/svn/trunk/qtruby/rubylib/examples/qdbus/listnames$ ruby
> listnames.rb
> listnames.rb:56:in `const_missing': uninitialized constant
> Qt::DBusConnection (NameError)
>         from listnames.rb:56
>
>
> Qt-Ruby itself works, I can for example run this great piece of software:
>
> ############################################
> #!/usr/bin/env ruby
> $VERBOSE = true; $:.unshift File.dirname($0)
>
> require 'Qt'
>
> a = Qt::Application.new(ARGV)
> hello = Qt::PushButton.new('Hello World!', nil)
> hello.resize(100, 30)
> hello.show()
> a.exec()
> ############################################
>
> listnames.rb:56 is the first line of this code-snippet:
>
> if !Qt::DBusConnection.sessionBus.connected?
>     $stderr.puts("Cannot connect to the D-BUS session bus.\n" \
>                     "To start it, run:\n" \
>                     "\teval `dbus-launch --auto-syntax`\n")
>     exit 1
> end
>
> I read the READMEs and so on and could find help there. Other examples like
> the std-dialogs (tabdialog...) do work here. And yes, of course I tried to
> run "eval `dbus-launch --auto-syntax`".
>
> Lets see if I am stupid or if there is a problem somewhere :)

I think you need to configure qtruby with the --enable-qtdbus=yes option, 
that's probably what has gone wrong.

-- Richard



More information about the Kde-bindings mailing list