Desktop multi-plataform ruby app

On Jun 7, 2:48 pm, Victor R. [email protected] wrote:

I guess I would have to uninstall Ruby. That’s not a big deal!

No, jruby executable is call jruby!

Just unarchive the last jruby distrib and add the bin/jruby to your
PATH. Then you can use either old ruby or new jruby as you like.

You also can start your jruby script with the firt line:
#!/usr/bin/env jruby
as any standard unix script.

If you alreadu have some (non gui) ruby script, you
can just replace “ruby” by “jruby” is the first line
and see by your self the performance.

(but jruby is still a litle slower than ruby at startup time, because
of the JVM)

  • Maurice

On Fri, Jun 6, 2008 at 11:08 PM, James B. [email protected]
wrote:

Does anyone have any performance numbers of Ruby vs JRuby?
The Matisse GUI editor than comes with NetBeans 6, all free, is great.

is the equivalent version of JRuby to the latest level of Ruby?

http://www.ruby-doc.org - Ruby Help & Documentation
http://www.rubystuff.com - The Ruby Store for Ruby Stuff

James,

Thank you very much for your time an explanations.
It looks like by switching to JRuby one would actually gain
functionalities.
Also, since at the moment I don’t have any truly number crunching appls
which would really benefit from a faster Ruby, I would give JRuby a try
this
weekend.
I guess I would have to uninstall Ruby. That’s not a big deal!

Again, thank you for your time and consideration.

Victor

On Sat, Jun 7, 2008 at 5:48 AM, Victor R. [email protected]
wrote:

I guess I would have to uninstall Ruby.

No, not necessary at all.

Try FXRuby

On Sat, Jun 7, 2008 at 10:14 AM, Hassan S. <

James B. wrote:

I would prefer something that has a graphical app that can help me
packaging for multiple platforms.

There is nothing better.

This all sounds very interesting, and I want to investigate it, but I
dread having to deal with the java monster. I’ve been there before.
Forty-five+ versions, all with 26 letter names, and documentation that
requires a masters in CS to decypher. I simply cannot know everything,
and I’m pretty committed in a couple of other fields. Still, I have
programming to get done, and drag and drop GUI that doesn’t require yet
another book to read would be a blessing.

So, onward, again. I try to install Netbeans 6 for Linux. Says it want a
JDK (the dread starts now). I’m on Kubuntu, so I go to Adept, find
sun-jave6-jdk - nothing else looks more likely - and install it. Now
Netbeans says it can’t find it and I need to point the way. Huh? Don’t
have a clue.

Looking at the helpful (?) installed files list under the tab of the
same name in I see a long file list. Nothing seems clearly the answer to
Netbeans problems, so I throw a number of possibilities at it. Nothing
works. Sigh.

Could someone who knows more please give me a clue here? I’m be most
grateful.

t.

Tom C., MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)

Israel G. wrote:

Thanks and best regards.

Hello Israel:

I haven’t written tons of apps with it but wxRuby (
http://wxruby.rubyforge.org/wiki/wiki.pl ) has been working well for me
on both Linux and Windows. Unfortunately I haven’t found a nice way to
do GUI building part visually.

Michael

I would recommend the same.

There is also the command whereis:

whereis java

I can’t remember, but i think it shows only where the binary is. Anyway
you
could try that.

On Sat, Jun 7, 2008 at 2:44 PM, Hassan S.
[email protected]

On Sat, Jun 7, 2008 at 10:02 AM, Tom C. [email protected] wrote:

So, onward, again. I try to install Netbeans 6 for Linux. Says it want a JDK
(the dread starts now). I’m on Kubuntu, so I go to Adept,

:preface => I hate *nix package managers :slight_smile:

I think you’d be better off downloading a JDK from Sun and installing
it the normal way, so you /know/ where it’s located. Then the rest of
the NetBeans install should be a piece of cake…

FWIW,

On Sat, Jun 7, 2008 at 7:02 PM, Tom C. [email protected] wrote:

I
http://www.monkeybars.org
masters in CS to decypher. I simply cannot know everything, and I’m pretty
name in I see a long file list. Nothing seems clearly the answer to Netbeans
problems, so I throw a number of possibilities at it. Nothing works. Sigh.

Could someone who knows more please give me a clue here? I’m be most
grateful.

I understand your dread - I have the same dread, and the same problems
getting
Java + XYZ to work. I actually currently have a Netbeans install that
I have tried
to use the built-in plugin installer to install Ruby support - after
incomprehensible
errors it knows nothing of Ruby. Busy re-downloading. I tried monkeybars
and the
tutorials for a few hours and failed completely. Perhaps it is very
good, but it is
surely also very complicated.

After failing there I have been having quite a nice time with
Glade/Gtk. I am working on
a tutorial but in the meantime, below is a message I sent a friend as an
intro.

Look at my previous post to this list for “glader” which should
convert your .glade
file to a program directly so get you started fast.

Also, be aware that the Glade form builder uses a bit of a different
form building philosophy if you
come from a VB/C#/VS environment. If you get stuck with it, mail me
and I’ll help out. You just need to understand a few of the ideas and
you can build good-looking forms really quickly and easily in Glade.

–snip–

Glade as a GUI builder works quite well on both Windows and Linux and
had a fair
selection of ok looking Widgets.

Installing it on Linux is also quite easy - apt-get libglade2-ruby1.8
and glade-3 to pull in
most of what you need. Certain widgets have their own packages, so you
may need
one of these, depending on which your Ruby program uses:

libgtk-mozembed-ruby - ruby binding of GtkMozEmbed, gecko renderer
libgtk-mozembed-ruby1.8 - ruby binding of GtkMozEmbed, gecko renderer
libgtkglext1-ruby - GTK+ GL extension bindings for the Ruby language
libgtkglext1-ruby1.8 - GTK+ GL extension bindings for the Ruby language
libgtkhtml2-ruby - GtkHTML bindings for the Ruby language
libgtkhtml2-ruby1.8 - GtkHTML bindings for the Ruby language
libgtksourceview1-ruby - GtkSourceView bindings for the Ruby language
libgtksourceview1-ruby1.8 - GtkSourceView bindings for the Ruby language

ie. apt-cache search libgtk|grep ruby

After that you build forms using glade-3 and run a little script
(ruby-glade-create-template) to
convert your XML glade files to Ruby programs. Well, almost. The
script creates a bit of
an example for you and doesn’t actually SHOW the form as you may
expect. To show the
form, you need to access the GladeXML object that is created in the
form’s initializer and
call something like @glade[“window1”].show, where “window1” is the id
of the form you
want to show.

I am going to improve the script so that it makes things much more
seamless, for now
it’s just a basic example-form-with-events creator. (see glader in prev
post)

In Windows you need to download a few things:
Ruby-gnome:
http://downloads.sourceforge.net/ruby-gnome2/ruby-gnome2-0.16.0-1-i386-mswin32.exe?modtime=1171279190&big_mirror=0

Glade and Gtk:
http://downloads.sourceforge.net/gladewin32/glade-3.4.3-win32-1.tar.bz2
http://downloads.sourceforge.net/gladewin32/gtk-2.12.9-win32-2.exe

There’s a bit of a guide (minus glade) here:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Install+Guide+for+Windows

Good luck!
Les

On Saturday 07 June 2008 12:44:46 Hassan S. wrote:

:preface => I hate *nix package managers :slight_smile:

The main reason I still use *nix is because of package managers.

I think you’d be better off downloading a JDK from Sun and installing
it the normal way, so you /know/ where it’s located.

Huh?

$ which java
/usr/bin/java
$ dpkg -L sun-java6-jdk
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/sun-java6-jdk
/usr/share/doc/sun-java6-jdk/README.html
/usr/share/doc/sun-java6-jdk/README.alternatives
/usr/share/doc/sun-java6-jdk/copyright
/usr/share/doc/sun-java6-jdk/changelog.Debian.gz
/usr/share/applications
/usr/share/applications/sun-java6-jconsole.desktop
(LONG output snipped – run it yourself)

Maybe it could be easier, but I can, in fact, get a list of every single
file
a package has installed – or every single file it will installed,
before I
do. Usually I use packages.ubuntu.com, but that seems to be down right
now…

Israel G. wrote:

wrote:

Thanks Hassan, and Israel, for you help. The matter resolved itself when
I restarted the Netbeans installation. Since I installed the JDK right
after NB complained about not finding it, and DIDN’T start the install
from scratch, but merely backed up a couple of windows and came forward
again, it still couldn’t find the JDK, post install. With a fresh start,
this time, it did.

I’m in business.

I agree at least in part with your comment about package installers.
Something they’re quicker though.

t.

Tom C., MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)

Since no one seemed to mention it…

On Friday 06 June 2008 14:50:50 Israel G. wrote:

I want to develop a desktop app that runs in either linux or windows.
I have many doubts about which GUI i should use. What’s the best option?

I can’t speak for the “best”, but there are many. Why’s Shoes looks the
most
interesting (to me, anyway), and you could also use Qt or GTK+ bindings.

I would prefer something that has a graphical app that can help me creating
the visual part.

Well, GTK+ has Glade, and Qt has qt-designer.

I’m a Rails developer by day, so when I want to create a UI beyond a
commandline, I usually build a web interface unless I have a good reason
not
to. Haven’t had a good reason not to, yet.

Tom C. wrote:

This all sounds very interesting, and I want to investigate it, but I
dread having to deal with the java monster. I’ve been there before.

So have I. And David created Monkeybars to avoid all that.

Seriously, you can write desktop apps that use Swing and run under JRuby
and never look at a line of Java. That’s basically the whole point.

We wanted whatever was good we could glom from Java, while avoiding
having to write any actual Java ourselves.

Forty-five+ versions, all with 26 letter names, and documentation that
requires a masters in CS to decypher. I simply cannot know everything,
and I’m pretty committed in a couple of other fields. Still, I have
programming to get done, and drag and drop GUI that doesn’t require yet
another book to read would be a blessing.

Monkeybars. It uses reflection and naming conventions to interact with
the UI components so that you stick to Ruby.

So, onward, again. I try to install Netbeans 6 for Linux. Says it want a
JDK (the dread starts now). I’m on Kubuntu, so I go to Adept, find
sun-jave6-jdk - nothing else looks more likely - and install it. Now
Netbeans says it can’t find it and I need to point the way. Huh? Don’t
have a clue.

Better off grabbing the JDB+NetBeans bundle from netbeans.org, then once
installed telling NetBeans to install the Ruby plugins.

There is a screencast on monkeybars.org that goes through the
installation of NetBeans:

http://monkeybars.rubyforge.org/tutorials/netbeans.html


James B.

“Tear it up and start again.”

  • Anonymous

On Sat, Jun 7, 2008 at 11:20 PM, James B. [email protected]
wrote:

and the
(off-list, perhaps) what you thought was complicated, I will see what I can
do to help you out.

I don’t think you failed, and it’s not that the process is complex,
it’s that the whole setup is
complex. I think Matisse is a fantastic GUI builder and have been
eagerly waiting for it to
support Ruby for ages now (even spoke to the developer for a while) so
I am glad there’s
finally a solution for wiring it into Ruby. It’s just that Ruby + Java

  • Packages + Netbeans + dependencies + MVC framework + updating + etc.
    is a very slow 50 step process with a
    huge number of dependencies.

I have just now finished that process for the second time and I still
don’t have anything to see.
I must have missed something. I watched all the videos and followed
all the tutorials here:
http://monkeybars.rubyforge.org/tutorials.html

The last page seems to be here:
http://monkeybars.rubyforge.org/tutorials/netbeans.html … which talks
about RAWR. Rawr install just seems to have added to my Rakefile, and
I don’t know what to do now. Do I start making forms? Do I run one of
the RAWR tasks? The link at the bottom of that page points back to
“using the generator” which I have already done. The link after that
is an overview page which is rather long and sounds good but still
doesn’t get me to just plain connect a form to my app!

When I got to this point before I started looking at the view,
thinking that it would be somehow related to a form I might build with
Matisse. I tried putting things into the quotes after set_java_class.

If I click “run” now I get to choose something to do with RAWR from a
combo box and then I get:

init:
deps-jar:
Created dir: /home/lesliev/dev/ruby-gui/demo/build/classes
Compiling 1 source file to /home/lesliev/dev/ruby-gui/demo/build/classes
/home/lesliev/dev/ruby-gui/demo/src/org/rubyforge/rawr/Main.java:11:
package org.jruby does not exist
import org.jruby.Ruby;
/home/lesliev/dev/ruby-gui/demo/src/org/rubyforge/rawr/Main.java:12:
package org.jruby.javasupport does not exist
import org.jruby.javasupport.JavaEmbedUtils;
/home/lesliev/dev/ruby-gui/demo/src/org/rubyforge/rawr/Main.java:19:
cannot find symbol
symbol : class Ruby
location: class org.rubyforge.rawr.Main
Ruby runtime = JavaEmbedUtils.initialize(new ArrayList(0));
/home/lesliev/dev/ruby-gui/demo/src/org/rubyforge/rawr/Main.java:19:
cannot find symbol
symbol : variable JavaEmbedUtils
location: class org.rubyforge.rawr.Main
Ruby runtime = JavaEmbedUtils.initialize(new ArrayList(0));
4 errors
BUILD FAILED (total time: 2 seconds)

So you see, it’s complicated.

Les

One thing i have really liked about monkeybars is the mvc thing. If i
choose
another GUI option, would i have another option that would give me the
mvc
abstraction like that?

Another option, like someone said, would be to use rails and forget a
non
web interface.

On Sat, Jun 7, 2008 at 7:03 PM, Leslie V. [email protected]

Israel G. wrote:

One thing i have really liked about monkeybars is the mvc thing. If i choose
another GUI option, would i have another option that would give me the mvc
abstraction like that?

I don’t know if other GUI tools encourages any particular way to
organize your code. I believe most are simply bindings to widgets.

Another option, like someone said, would be to use rails and forget a non
web interface.

If so, you should give a look at Ramaze, Merb, and some of the other
dozen+ Ruby Web frameworks. Find something that suits how you want to
work and build.


James B.

www.risingtidesoftware.com - Wicked Cool Coding
www.rubystuff.com - The Ruby Store for Ruby Stuff

James B. wrote:

Better off grabbing the JDB+NetBeans bundle from netbeans.org, then
once installed telling NetBeans to install the Ruby plugins.

There is a screencast on monkeybars.org that goes through the
installation of NetBeans:

http://monkeybars.rubyforge.org/tutorials/netbeans.html

Yeah, I’m sold. Did a brief scan of the website and immediately liked
what I saw. Monkeybars looks slick. Heck, I might even be able to
understand it! Hope springs eternal, yessir. So, I’m all installed and
ready to have a swing at it, as soon as I find a free moment.

All the dependencies, etc., DOES look (in the mind) a bit scary, but
I’ve found that if one give the Big Boys a few months, they generally
get things wired together so they Just Work. And beyond that, there’s
the marvelous Ruby community. Rare has been the time that I haven’t
gotten an answer back to whatever problem I’ve posted about - in under
an hour. Phenomenal, actually. The rest of life should be so good!

t.

Tom C., MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)

Leslie V. wrote:

I understand your dread - I have the same dread, and the same problems getting
Java + XYZ to work. I actually currently have a Netbeans install that
I have tried
to use the built-in plugin installer to install Ruby support - after
incomprehensible
errors it knows nothing of Ruby. Busy re-downloading. I tried monkeybars and the
tutorials for a few hours and failed completely. Perhaps it is very
good, but it is
surely also very complicated.

If you honestly believe that then we (the Monkeybars crew) have failed
someplace, perhaps in the docs or the screencasts, because the last
thing we want is anything complicated.

Now, granted, I’m biased (I’m a Monkeybars contributer and have been
building production apps with it for almost a year), but if you can
tell me (off-list, perhaps) what you thought was complicated, I will see
what I can do to help you out.


James B.

“Tear it up and start again.”

  • Anonymous

Israel G. wrote:

I hardly believe that an interpreter made in java running on a jvm will be
as fast as a C interpreter.

1 thing could cause that and would be a very bad work made on the CRuby and
i don’t believe that’s the case.

The truth is that the convenience of the JRuby is ok for most end uses.

Try JRuby yourself and see. If it’s not faster, file it as a bug. We are
working very hard to make JRuby as fast as possible.

  • Charlie

mdiam wrote:

(but jruby is still a litle slower than ruby at startup time, because
of the JVM)

In 1.1.2 we have hopefully improved that…for me, startup time went
from 1.5s to about .6s, which is a great improvement. Others have
reported similar boost, maybe not as great. Work continues.

  • Charlie