Conversion from glade to ruby file

Hi all,

I am using Glade for GUI design and I can’t convert glade to ruby file.
Whenever I use ruby-glade-create-template file.glade > file.rb I get the
error message “command not found”.

I am using Ubuntu Oneiric and I “think” I have installed everything I
need including the ruby-GNOME2.

I then tried Gladex but it won’t start due to a bug.

Can someone suggest a fix, a workaround or another way of creating GUI.

thank you.

regards

seba

I think Glade is deprecated.

I would recommend to bite the bullet and entirely stop using Glade.

I did so for my ruby-gtk projects and design all by hand.

Sure it is more work, but things work easier too.

PS: You did not say which ruby-gtk version you use, and whether it is an
ubuntu package or not.

Often ubuntu patches and modifies things in their own ways.

Marc H. wrote in post #1051490:

I think Glade is deprecated.

I would recommend to bite the bullet and entirely stop using Glade.

I did so for my ruby-gtk projects and design all by hand.

Sure it is more work, but things work easier too.

PS: You did not say which ruby-gtk version you use, and whether it is an
ubuntu package or not.

Often ubuntu patches and modifies things in their own ways.

Well, I’ve installed Ruby-GNOME2 1.1.2.

As far as the designing goes, I really need a program such as Glade for
GUI since I am still learning to program…

regards,
seba

Thank you for the advice and I agree that by coding everything myself is
a great way to learn. Still, I would like to know if there is any way
around this problem for me to use Glade and Ruby.

I also thought it was deprecated but I didn’t see that on the
http://ruby-gnome2.sourceforge.jp.

If Glade is deprecated, what other gui designer would be recommended?

regards,
seba

hi Sebastjan,

I would recommend to bite the bullet and entirely stop using Glade.

I did so for my ruby-gtk projects and design all by hand.

Sure it is more work, but things work easier too.

i also use gtk2 for gui’s, and i agree with Marc…

As far as the designing goes, I really need a program such as Glade for
GUI since I am still learning to program…

particularly if you’re just beginning, i think it’s a good idea to get
in there and write the gui by hand - it will take away the ‘magic and
mystery’ behind what you’re doing. gtk2 is pretty well documented -
here’s a good tutorial to get you started -
http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk - and there’s the
Gnome 2 section of this forum which is a great place to post questions
and/or problems that you have. in general, when you’re wondering about
how to use a particular widget, a quick google search for ‘ruby gtk [the
widget]’ will bring you to the appropriate page of the gnome2 api docs.

start simple, with some dumb little gui… and work up from there, i
think you’ll find it’s worth the effort…

also - check out Shoes, and Green Shoes - http://shoesrb.com/ - it is
MUCH easier to get started with than gtk2, and you can really do quite a
lot with it. there’s also a very active and helpful community, with a
mailing list here - http://librelist.com/browser/shoes/

regards,

  • j

hi (again) Seba,

If Glade is deprecated, what other gui designer would be recommended?

Shoes, Shoes, and Shoes!! check it out… it’s really worth it. it
makes it easy to design gui’s without any kind of ‘magic’ - aside from
what _why left us, and what those that maintain the project continue to
provide.

the beautiful thing about Shoes is that it’s SUPER simple to get
started coding gui’s by hand - and that you can go and go from there,
discovering new things, and realizing all that you can do with this
“simple” toolkit.

that said… the REALLY BEAUTIFUL thing about Shoes is the community
that supports it. any questions you might have from anything about
writing the simplest Shoes app, to building your own flavor of Shoes[*]
can be considered and hopefully answered by the Shoes community…

[*] (to date there are Red, Green, Brown, Purple, and other Shoes that i
apologize for forgetting, all built with their particular quirks)

it’s just awesome - check it out… http://shoesrb.com/

the mailing list for questions and whatnot is here:
http://librelist.com/browser/shoes/

to sign up to the mailing list, look here: http://librelist.com/
(specifically the “Anyone Can Subscribe To A List” bit…)

Shoes On -

  • j

Sebastjan H. wrote in post #1051588:

Thank you for the advice and I agree that by coding everything myself is
a great way to learn. Still, I would like to know if there is any way
around this problem for me to use Glade and Ruby.

I also thought it was deprecated but I didn’t see that on the
http://ruby-gnome2.sourceforge.jp.

If Glade is deprecated, what other gui designer would be recommended?

regards,
seba

Glade the program isn’t deprecated; just the old libglade. The
GtkBuilder library and output format is supported instead. I don’t know
how this impacts Ruby GTK+ tools, though.

Gtk2 must be installed. the simpler is install Inkscape or Dia…
Green shoes work directly,gtk2 code is in ruby.

You can try Ruiby (an another DSL for gui) too :
http://regisaubarede.posterous.com/tag/ruiby

regards,
Regis

Regis d’Aubarede wrote in post #1051796:

Gtk2 must be installed. the simpler is install Inkscape or Dia…

I am not sure what you mean, I have both Dia and Inkscape installed and
Shoes doesn’t start. The error is the same.

Green shoes work directly,gtk2 code is in ruby.

You can try Ruiby (an another DSL for gui) too :
http://regisaubarede.posterous.com/tag/ruiby

regards,
Regis

regards,
seba

jake kaiden wrote in post #1051744:

hi (again) Seba,

If Glade is deprecated, what other gui designer would be recommended?

Shoes, Shoes, and Shoes!! check it out… it’s really worth it. it
makes it easy to design gui’s without any kind of ‘magic’ - aside from
what _why left us, and what those that maintain the project continue to
provide.

the beautiful thing about Shoes is that it’s SUPER simple to get
started coding gui’s by hand - and that you can go and go from there,
discovering new things, and realizing all that you can do with this
“simple” toolkit.

that said… the REALLY BEAUTIFUL thing about Shoes is the community
that supports it. any questions you might have from anything about
writing the simplest Shoes app, to building your own flavor of Shoes[*]
can be considered and hopefully answered by the Shoes community…

[*] (to date there are Red, Green, Brown, Purple, and other Shoes that i
apologize for forgetting, all built with their particular quirks)

it’s just awesome - check it out… http://shoesrb.com/

the mailing list for questions and whatnot is here:
http://librelist.com/browser/shoes/

to sign up to the mailing list, look here: http://librelist.com/
(specifically the “Anyone Can Subscribe To A List” bit…)

Shoes On -

  • j

I wanted to try Shoes before cause it seemed like the best option,
however, when I try to run it, I always get the following error:
eval1: shoes not found

I’ve searched for the solution and I’ve ended up on the github/shoes
where appears to be no solution yet. Being a complete beginner the only
option is to wait and learn in the meanwhile:)

regards,
seba

Hi j,

actually I’ve just started with HacketyHack’s (http://hackety.com/)
tutorial today, and I’ve been learning Ruby for a short time now.

I hope you don’t mind me asking this here, but before I dive into Shoes
more seriously (I probably will anyway:), I would like to know what are
the limitations of the Shoes. I mean how complex GUI can I put together.
Is the only limitation my imagination:)

Furthermore how would I go about running such an application on a
different platform, like Windows? Is the only prerequisite a Shoes
installation?

Again, I apologise for asking this here and you can easily point me to
some FAQ or guide, but I will really appreciate any info on the subject.

thx and regards,

seba

hi Seba,

I wanted to try Shoes before cause it seemed like the best option,
however, when I try to run it, I always get the following error:
eval1: shoes not found

…hmm - strange. you could check out this page:
https://github.com/shoes/shoes/wiki/Building-Shoes-on-Linux - for info
on building Red Shoes yourself - it’s really quite easy.

as Regis mentioned, an easier option would be to use Green Shoes… if
you’ve got:

Ruby 1.9 or above
Gems 1.5 or above
ruby-gtk2 package 0.90.7 or above

you can just:

=> gem install green_shoes

…and away you go. once you’ve got the gem installed, write a script
like this:

require ‘green_shoes’

Shoes.app do
para “hello Shoes-world!”
end

…that’s it! cool, right?

hth-

  • j

Sebastjan H. wrote in post #1051904:

Hi j,

actually I’ve just started with HacketyHack’s (http://hackety.com/)
tutorial today, and I’ve been learning Ruby for a short time now.

I hope you don’t mind me asking this here, but before I dive into Shoes
more seriously (I probably will anyway:), I would like to know what are
the limitations of the Shoes. I mean how complex GUI can I put together.
Is the only limitation my imagination:)

Furthermore how would I go about running such an application on a
different platform, like Windows? Is the only prerequisite a Shoes
installation?

Again, I apologise for asking this here and you can easily point me to
some FAQ or guide, but I will really appreciate any info on the subject.

thx and regards,

seba

Just to amend the above, I have read the official introduction of Shoes,
but it’s still a it difficult to imagine where Shoes capabilities end
and I should take over in Glade or QT, if at all…

Hi j,

thx again for this in-depth explanation. I think I’ll probably combine
Shoes and gtk2. However, I have a long way to go since I am a complete
beginner, but ruby and shoes (or gtk) really make things fun.

regards
seba

this is the last one here, I promise:)

What is your opinion on QT? I’ve read about it and also the comparisons
between gtk and QT, however, I would like to hear it from the people who
know both and why are the using one or another. It would be great know
this before starting to learn more.

regards,
seba

hi Seba,

actually I’ve just started with HacketyHack’s (http://hackety.com/)

great, hackety is awesome!!

I hope you don’t mind me asking this here, but before I dive into Shoes
more seriously (I probably will anyway:), I would like to know what are
the limitations of the Shoes. I mean how complex GUI can I put together.
Is the only limitation my imagination:)

i certainly don’t mind - and yes, really the only limitation is your
own imagination…

check this out for a bunch of samples:
http://shoes-tutorial-note.heroku.com/

you can do anything from simple games to much more complex gui’s. i
also came from (and still use) gtk2, and a neat thing about Green Shoes
in particular is that you can write classes in gtk, and use them in
Green Shoes with no problem… here’s a link to the project i made with
green (and red) Shoes:

project page:
https://sites.google.com/site/gswax0/home

git:
https://github.com/lljk/gsWax

Furthermore how would I go about running such an application on a
different platform, like Windows? Is the only prer: equisite a Shoes
installation?

Shoes is (are) multi-platform - yes, the only prerequisite is having
some flavor of Shoes installed…

Again, I apologise for asking this here and you can easily point me to
some FAQ or guide, but I will really appreciate any info on the subject.

don’t worry - a great place for more Shoes specific talk is the
mailing list:

http://librelist.com/browser/shoes/

to subscribe, send your first message to: http://librelist.com/

Do Shoes!

  • j

when I try to install green shoes, I get te following error:

Invalid gemspec in
[/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date
format in specification: “2011-09-18 00:00:00.000000000Z”
Invalid gemspec in
[/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date
format in specification: “2011-09-18 00:00:00.000000000Z”
ERROR: While executing gem … (URI::InvalidURIError)
bad URI(is not URI?): http://localhost:4001

Sebastjan H. wrote in post #1052289:

when I try to install green shoes, I get te following error:
/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date

ruby 1.8 ? try 1.9 …

this is the last one here, I promise:)
:wink:

I know, that was my first reaction too, however, I do have 1.9 installed
(it won’t help to paste the printout cause it’s in Slovenian, it just
states for every item that it is already installed). But when I prompt
for ruby version I get: ruby 1.8.7 (2011-06-30 patchlevel 352)
[i686-linux]

So do I have to manually remove/delete 1.8? I’ve searched this forum,
but I am still not sure how to.

Sebastjan H. wrote in post #1052359:

I know, that was my first reaction too, however, I do have 1.9 installed >…
But when I prompt
for ruby version I get: ruby 1.8.7 (2011-06-30 patchlevel 352)
[i686-linux]

So do I have to manually remove/delete 1.8? I’ve searched this forum,
but I am still not sure how to.

hi Seba,

did you install both through the package manager? if so, 1.8.7 will
still be the default. i had this problem myself!

i believe that there are ways to change your environment variables, so
that 1.9.x is the default, but i have to apologize for not knowing
them…

i use rvm, which keeps everything nice and organized, and lets you
switch easily between ruby versions… the installation seems a little
complicated, but it’s really not that bad - here are some links:

http://beginrescueend.com/rvm/basics/
http://beginrescueend.com/rvm/install/

the bash profile referred to in the installation instructions should
be (if you’re using ubuntu) a hidden file in your home directory called
“.bashrc” . enable the ‘show hidden files’ option in the view menu of
nautilus to see it. be careful with it, maybe make a copy before
messing with it too much!

once you’ve got rvm installed, and both 1.8.7 (pre-requisite) and
1.9.3 installed through rvm, install green shoes with:

$ use 1.9.3
$ gem install green_shoes

make sure to not use sudo gem install green_shoes - you want the
gems installed through rvm, not your system ruby.

you can also set the rvm 1.9.3 to be the default ruby version when you
open a terminal like this:

$ rvm --default use 1.9.3

good luck!

  • j

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs