Forum: Ruby-Gnome 2 ruby-gnome2 on a mac

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Roy W. (Guest)
on 2008-11-30 12:46
Howdy,

Just thought I'd give a report on trying ruby-gnome2 on a new macbook.

Prerequisites:
* X Code 3.0+ (I used 3.0 as I'm having a problem installing the latest
3.1.2)
* XQuartz
* MacPorts

Using MacPorts, install: gawk (or nawk), python25, python_select (then
use it to select python25), ruby, rb-rubygem, vte, librsvg,
gtksourceview, gtksourceview2, libgtkhtml, gtkglext, libgnomeui

Could not install:
* poppler (unable to download openjpeg)
* gtkmozembed (not in macports)
* panel-applet (not in macports)
* gstreamer (installed but needs gstreamer-plugins-base which is not in
macports)
* goocanvas-0.9 (failed to compile)

Downloaded and installed ruby-gnome2-all-0.18.1

I quickly tried one of my mid sized rgnome2 (strictly gtk2) apps and had
two observations:

1) there appears to be a font metrics problem where about twice the
vertical space is allocated than is necessary.  The app uses default
fonts.

2) after minimizing the app then restoring it, the display widgets are
not drawn.  Basically a blank window with white rectangles where Entry
widgets should be.


Have fun,
Roy
Mikael H. (Guest)
on 2008-12-01 00:32
(Received via mailing list)
Hi,

You might want to try out the native GTK+ port to Mac OS X instead.
This will give you an environment without X (or Macports).

1) Build native GTK+ according to
http://developer.imendio.com/projects/gtk-macosx/

(remember to run 'jhbuild shell')

2) Build ruby in the same prefix ($JHBUILD_PREFIX)

3) Build ruby-gnome2 in this environment

Cheers,
   Micke

30 nov 2008 kl. 11.46 skrev Roy W.:

>
> macports)
> fonts.
>
> removed_email_address@domain.invalid
> https://lists.sourceforge.net/lists/listinfo/ruby-...

--
Mikael H.
Imendio AB - Expert solutions in GTK+
http://www.imendio.com
Roy W. (Guest)
on 2008-12-02 03:18
Mikael H. wrote:
> Hi,
>
> You might want to try out the native GTK+ port to Mac OS X instead.
> This will give you an environment without X (or Macports).
>

Thank you.  I just gave it a try and hit a major problem with signal
catching.  Here's a little demo:

#!/usr/bin/env ruby

require "gtk2"

Gtk.init
window = Gtk::Window.new
window.signal_connect('destroy') {Gtk.main_quit}
entry = Gtk::Entry.new
entry.signal_connect('changed') {|widget, event| puts "#{widget.name}
changed"}
entry.text = 'Howdy'
frame = Gtk::Frame.new('Content Frame')
frame.add entry
window.add frame
window.show_all
Gtk.main

And here's the output:

roy-wrights-macbook:gtk-demo royw$ jhbuild shell
Prefix: /Users/royw/gtk/inst
Entered jhbuild shell, type 'exit' to return.
bash-3.2$ ./demo2.rb

** ERROR **: Please call rbgutil_start_callback_dispatch_thread() to
dispatch a callback from non-ruby thread before callbacks are requested
from non-ruby thread.
aborting...
Trace/BPT trap

Now if you reverse the entry.text and entry.signal_connect lines in the
above example, the window appears but will have the same crash if you
try to change the value in the entry widget or if you close the
application.

Any ideas?

Thank you,
Roy
Mikael H. (Guest)
on 2008-12-02 09:04
(Received via mailing list)
Hi,

That sounds odd, that code runs fine here but I don't have the very
latest version of ruby-gnome2. Did you end up with the same version of
the bindings as you were using in your Macports environment?

// Micke

2 dec 2008 kl. 02.18 skrev Roy W.:

> #!/usr/bin/env ruby
> frame = Gtk::Frame.new('Content Frame')
> bash-3.2$ ./demo2.rb
> above example, the window appears but will have the same crash if you
> -------------------------------------------------------------------------
> https://lists.sourceforge.net/lists/listinfo/ruby-...
--
Mikael H.
Imendio AB - Expert solutions in GTK+
http://www.imendio.com
Roy W. (Guest)
on 2008-12-02 10:05
Mikael H. wrote:
> That sounds odd, that code runs fine here but I don't have the very
> latest version of ruby-gnome2. Did you end up with the same version of
> the bindings as you were using in your Macports environment?

Yes with one exception, used python25-apple instead of the macports
python25.

ruby-1.8.7-p72
ruby-gnome2-all-0.18.1

Here's the tail of configuring ruby-gnome:

Target libraries: glib, gdkpixbuf, pango, atk, gtk
Ignored libraries: bonobo, bonoboui, gconf, gnome, gnomecanvas,
gnomeprint, gnomeprintui, gnomevfs, goocanvas, gstreamer, gtkglext,
gtkhtml2, gtkmozembed, gtksourceview, gtksourceview2, libart, libglade,
panel-applet, poppler, rsvg, vte

I think I'll try to upgrade to XCode 3.1.2 again then try rebuilding the
jhbuild environment.

Thank you.
Roy W. (Guest)
on 2008-12-03 01:29
Roy W. wrote:
> I think I'll try to upgrade to XCode 3.1.2 again then try rebuilding the
> jhbuild environment.

After the rebuild (xcode 3.1.2, jhbuild, ruby, ruby-gnome2), the above
demo ran fine.

Thank you,
Roy
Luigi Maselli -. (Guest)
on 2009-05-08 20:23
Hi, do you know if a ruby-gnome2 dmg is avalaible?

I installed Mono and Tomboy dmg and they run fine and without Xcode.
This topic is locked and can not be replied to.