Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Getting GUI for ruby for Linux running (QT or wxWidget)?

Reply
Thread Tools

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

 
 
Markus Fischer
Guest
Posts: n/a
 
      09-19-2010
Hi,

I'm trying to evaluate GUI development with Ruby on Linux and Windows
and currently I decided to try QT and wxWdigets.

Seems it's not my weekend, I really tried for hours, various attempts
and I could get neither running. I started with Ubuntu 10.10 64bit off
first, not yet settled on the Windows side.

QT:
First struggled to realized there's not gem for it. Downloaded the
sources from
http://rubyforge.org/frs/download.ph...y-2.1.0.tar.gz and
now I'm sitting there and I've no idea what to do. The included INSTALL
refers to http://techbase.kde.org/Getting_Started/Build/KDE4 which has
no mentions of ruby whatsoever. The README in contrast gave some
insights and "Install examples", ultimatively I figured I just need to
run "cmake .". However it quit with "Could not find Ruby" but ruby is
installed (1.9.1p378 via rvm). I gave up (no idea how to work this out
with cmake, never used it).

wxWidgets:
With joy I started because I saw wxruby gem, installation goes fine but
fails with

`require': libwx_gtk2u_media-2.8.so.0: cannot open shared object file:
No such file or directory

After some googling I came to the conclusion that I'm out of luck as the
wxwidgets provided by Ubuntu seem to miss this feature. No idea I
thought, I can role my own wxwidgets, no? So I downloaded latest source,
but couldn't compile it because it requires swig 1.3.38 but Ubuntu ships
with 1.3.40. Downloaded and tried to compile swig 1.3.38 but it failed with:

Modules/swigmod.h:20: error: redeclaration of C++ built-in type ‘bool’

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

No idea why it requires a file not being there or where this file could
be (no result from "apt-cache search" or packages.debian.org ) ->
another dead end.


So what I started out as "must be a piece of cake" turned out to be
hours of hours trying various things without outcome. What are you using
when you say you've QT or wxWidgets questions? Which distributions and
which Ruby versions are you running?

I'm thankful for any advice for the aforementioned problems.

thx,
- Markus

 
Reply With Quote
 
 
 
 
Markus Fischer
Guest
Posts: n/a
 
      09-19-2010
On 20.09.2010 01:14, Markus Fischer wrote:
> 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


There's a slight but important to note error here: of course I didn't
try to compile wxwidgets (there's a ready package from Ubuntu there
already!) but wxruby which failed at the end.

- Markus

 
Reply With Quote
 
 
 
 
Mohammed Rashad
Guest
Posts: n/a
 
      09-20-2010
[Note: parts of this message were removed to make it a legal post.]

try FXRuby

On Mon, Sep 20, 2010 at 4:48 AM, Markus Fischer <(E-Mail Removed)> wrote:

> On 20.09.2010 01:14, Markus Fischer wrote:
> > 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

>
> There's a slight but important to note error here: of course I didn't
> try to compile wxwidgets (there's a ready package from Ubuntu there
> already!) but wxruby which failed at the end.
>
> - Markus
>
>



--
Rashad

 
Reply With Quote
 
Chauk-Mean Proum
Guest
Posts: n/a
 
      09-20-2010
Hi,

The following link may help you :
http://wxruby.rubyforge.org/wiki/wik...DistroPackages

Markus Fischer wrote:
> On 20.09.2010 01:14, Markus Fischer wrote:
>> 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

>
> There's a slight but important to note error here: of course I didn't
> try to compile wxwidgets (there's a ready package from Ubuntu there
> already!) but wxruby which failed at the end.


Chauk-Mean.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Quintus
Guest
Posts: n/a
 
      09-20-2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 20.09.2010 01:18, schrieb Markus Fischer:
> On 20.09.2010 01:14, Markus Fischer wrote:
>> 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

>
> There's a slight but important to note error here: of course I didn't
> try to compile wxwidgets (there's a ready package from Ubuntu there
> already!) but wxruby which failed at the end.
>
> - Markus
>
>

wxRuby doesn't work out of the box with Ubuntu 9.10 and newer, because
Ubuntu switched to GCC 4 I think. There are build instruction available
at
http://wxruby.rubyforge.org/wiki/wik...DistroPackages
which work quite well for me, because I already compile all my Ruby
installations myself. Adding an extra switch to Ruby's ./configure was
not _that_ hard therefore, but I'm not sure if the Ruby provided in the
Ubuntu repositories was compiled with --enable-shared.
However, I'm working on another GUI project that uses wxRuby, and
published compiled wxRubies for 32 and 64 bit for use with Ruby
1.9.2-p0. They're available from
http://github.com/Quintus/OpenRubyRMK/downloads . However, they're
untested, so I'd be glad if you could report wheather they work or don't.

Vale,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyXdAoACgkQDYShvwAbcNkprACfS3yD2J1d5H IMSewb8JI8Ly8W
EUwAnAlSsJxRwwtTmny4UnG7LQ0HPGma
=/M54
-----END PGP SIGNATURE-----

 
Reply With Quote
 
Ryan Melton
Guest
Posts: n/a
 
      09-21-2010
[Note: parts of this message were removed to make it a legal post.]

qt does have a new gem I put together:
gem install qtbindings

See the github page and make sure you have all the dependencies before
installing:
http://github.com/ryanmelt/qtbindings

On Mon, Sep 20, 2010 at 8:47 AM, Quintus <(E-Mail Removed)> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 20.09.2010 01:18, schrieb Markus Fischer:
> > On 20.09.2010 01:14, Markus Fischer wrote:
> >> 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

> >
> > There's a slight but important to note error here: of course I didn't
> > try to compile wxwidgets (there's a ready package from Ubuntu there
> > already!) but wxruby which failed at the end.
> >
> > - Markus
> >
> >

> wxRuby doesn't work out of the box with Ubuntu 9.10 and newer, because
> Ubuntu switched to GCC 4 I think. There are build instruction available
> at
> http://wxruby.rubyforge.org/wiki/wik...DistroPackages
> which work quite well for me, because I already compile all my Ruby
> installations myself. Adding an extra switch to Ruby's ./configure was
> not _that_ hard therefore, but I'm not sure if the Ruby provided in the
> Ubuntu repositories was compiled with --enable-shared.
> However, I'm working on another GUI project that uses wxRuby, and
> published compiled wxRubies for 32 and 64 bit for use with Ruby
> 1.9.2-p0. They're available from
> http://github.com/Quintus/OpenRubyRMK/downloads . However, they're
> untested, so I'd be glad if you could report wheather they work or don't.
>
> Vale,
> Marvin
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkyXdAoACgkQDYShvwAbcNkprACfS3yD2J1d5H IMSewb8JI8Ly8W
> EUwAnAlSsJxRwwtTmny4UnG7LQ0HPGma
> =/M54
> -----END PGP SIGNATURE-----
>
>


 
Reply With Quote
 
Markus Fischer
Guest
Posts: n/a
 
      09-21-2010
On 21.09.2010 05:41, Ryan Melton wrote:
> qt does have a new gem I put together:
> gem install qtbindings
>
> See the github page and make sure you have all the dependencies before
> installing:
> http://github.com/ryanmelt/qtbindings


That sounds great, I'll test that for sure when I'm home later. Thanks
in advance!

- Markus


 
Reply With Quote
 
Benoit Daloze
Guest
Posts: n/a
 
      09-21-2010
On 21 September 2010 05:41, Ryan Melton <(E-Mail Removed)> wrote:
> qt does have a new gem I put together:
> gem install qtbindings
>
> See the github page and make sure you have all the dependencies before
> installing:
> http://github.com/ryanmelt/qtbindings
>


Yeah, that's quite cool.
But you absolutely need the MacPorts Qt (as recommended) (Homebrew or
binary did not work for me).

> I'm trying to evaluate GUI development with Ruby on Linux and Windows
> and currently I decided to try QT and wxWdigets.


The QtRuby API is really nice, so I would recommend you Qt.

I finally was able to install QtRuby a few days ago, and I'm really enjoying it.
I installed on OSX, so I do not know about other platforms, but I
believe the instructions from the qtbindings gem, so it should be
relatively easy.

Regards,
B.D.

 
Reply With Quote
 
Markus Fischer
Guest
Posts: n/a
 
      09-21-2010
Hi,

On 20.09.2010 16:47, Quintus wrote:
> wxRuby doesn't work out of the box with Ubuntu 9.10 and newer, because
> Ubuntu switched to GCC 4 I think.


Finally I got it working on Ubuntu 10.04 64bit!

Your post indirectly helped me, because I simply didn't realized there
was an wxruby-ruby19 package and I *am* using ruby 1.9.something.

I tried one of the examples and it instantly worked.

wxruby requires "libwx_gtk2u_media-2.8.so.0" which is available on 10.04
but *not* on 10.10 (which I initially tried, leave alone I tried the
wrong version).

I'm wondering why the gem did let me install a version it doesn't work
it, i.e. some kind of ruby version dependency.

thanks for the help!
- Markus

 
Reply With Quote
 
Markus Fischer
Guest
Posts: n/a
 
      09-21-2010
Hi,

On 21.09.2010 05:41, Ryan Melton wrote:
> qt does have a new gem I put together:
> gem install qtbindings
>
> See the github page and make sure you have all the dependencies before
> installing:
> http://github.com/ryanmelt/qtbindings


Works great! Once I figured all packages I needed it worked out of the
bugs in Ubuntu 10.04 64bit, minus the KNOWN_ISSUES.txt things.

On Ubuntu 10.10 64b it stops with this error:

cp: cannot stat `ext/build/smoke/qtmultimedia/libsmokeqtmultimedia.*':
No such file or directory
make: *** [install] Error 1

thanks,
- Markus

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a "Segmentation Fault" when running on Linux Maxx C Programming 17 01-02-2012 05:31 PM
Re: Is Netscape Leaving Firefox Behind on GNU/Linux? THE LINUX PROPAGANDA MACHINE CONTINUES. FIREFOX IGNORING LINUX............. traci.manicotti@gmail.com Computer Support 2 10-20-2007 02:12 PM
[Gui] Which GUI is available with Ruby? Flaab Mrlinux Ruby 3 11-15-2006 11:44 PM
Linux... yeah linux.. Linux Have a nice cup of pee NZ Computing 19 04-17-2006 10:16 AM
Getting the KVM running on ARM Linux on an ARM processor based device Steve Jasper Java 0 11-20-2003 06:55 PM



Advertisments