Getting GUI for ruby for Linux running (QT or wxWidget)?

On Wed, Sep 22, 2010 at 1:19 AM, Martin DeMello
removed_email_address@domain.invalid wrote:

Seconded. Excellent work, Ryan. Will see if I can get it running on
the N900 too.

I got this working on the N900 as follows:

  1. Install kaspernj’s optified ruby packages from here:
    Cant find Ruby GTK anywhere? - maemo.org - Talk

  2. Compile the qtbindings gem on the scratchbox

apt-get install cmake
apt-get install libqt4-dev
gem install rake
gem install qtbindings
cd /opt/ruby/lib/ruby/gems/1.8/gems/qtbindings-4.6.3.0/
rake gemnative

  1. Copy the generated qtbindings-4.6.3.0-arm-linux.gem to the N900 and
    install

  2. Add
    /opt/ruby/lib/ruby/gems/1.8/gems/qtbindings-4.6.3.0-arm-linux/lib/1.8
    to /etc/ld.so.conf and run ldconfig

Most of the examples work, though the desktop qt widgets aren’t too
usable (does smoke generate qtmobility bindings too?). One oddity I
noted was that the gem copies rather than symlinking libraries, e.g.

$ ls -al
.rvm/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9/gems/qtbindings-4.6.3.0/lib/1.9/

-rwxr-xr-x 1 martin martin 958109 2010-09-23 14:16
libsmokeqtuitools.so
-rwxr-xr-x 1 martin martin 958109 2010-09-23 14:16
libsmokeqtuitools.so.3
-rwxr-xr-x 1 martin martin 958109 2010-09-23 14:16
libsmokeqtuitools.so.3.0.0

martin

Hi,

On 22.09.2010 04:32, Ryan M. wrote:

Thanks for the feedback. I’ll work on the issues with Ubuntu 10.10 once it
gets out of beta.

Yeah, I figured that too. No idea why I reasoned to use 10.10 in the
first place, that was a lesson. I actually don’t care about 10.04 or
10.10, things simply have to work. Thanks :slight_smile:

  • Markus

On 20.09.2010 01:14, Markus F. wrote:

No idea how something like this can happen, so I stopped here. I thought
maybe Ubuntu 10.10 is too new (it’s still beta after all) so I installed
10.04 and I could compile swig 1.3.38 there but failed at compiling
wxwidgets right before the final linking stage (I was almost there!):

/usr/bin/ld: cannot find -lgtk-x11-2.0

I finally was able to figure out that one too: I was missing the
libgtk2.0-dev package and dependencies. Now it’s crystal clear I need
those -dev packages but what was puzzling is that it seemed the whole
compilation process worked but only during the final linking stage it
didn’t. And since there was (!) a similar file named
/usr/lib/libgtk-x11-2.0.so.0.2000.1 .

It was necessary for me to compile my own wxruby because the one
installable from gem didn’t include opengl for some reason. Maybe it’s
the difference in version number, wxruby 2.0.0 vs. 2.0.1:

wxruby-ruby19 (2.0.1 x86-darwin-9 x86-linux x86-mingw32, 2.0.0
x86_64-linux)

  • Markus