JRuby & Netbeans For Noobs/Dummies

After spending far too much time googling for assistance in using
Netbeans and JRuby I have decided to try a different approach.
In my blog http://paulfraser.blogspot.com/ I have started a series to
try and bring together the info needed to successfully use JRuby &
Netbeans.
At present it is just too damn hard :frowning: . There is not enough effort
devoted to using JRuby without rails in Netbeans.

For the series to be successful, it is hoped that the experts behind
Netbeans & JRuby join in and help to make the experience “less hard” and
try and put the information needed to get a project/application going
for the “less talented” and “less experienced” amongst us, IN THE ONE
PLACE.

What do you think? Please offer suggestions for improvement and
assistance in making the commentry clear and easy to follow.
It is most important that the content explains every detail and leaves
no steps to the imagination. One very simple step at a time.

Cheers
Paul F.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Paul,

I noticed that you wrote “If you want to include any gems from a
previous ruby install add the directory to Gem Path
C:\ruby\lib\ruby\gems\1.8”

I am wondering where you read that suggestion. I would recommend
against adding C:\ruby\lib\ruby\gems\1.8 to the Gem Path. The reason is
that JRuby cannot use gems build native C libraries as part of their
install process (see
http://wiki.jruby.org/wiki/Getting_Started#Installing_and_using_Gems_in_JRuby).

I am also wondering why you clicked the Build button instead of the Run
button.

You might want to look at the short tutorial at
http://www.netbeans.org/kb/trails/ruby.html: Getting Started With Ruby
and Rails. This tutorial does not teach you about JRuby, but might help
you quickly learn how to use the IDE for a Ruby project (the first part
of the tutorial). Since you are using the bleeding edge (the nightlies),
you need to take into consideration the differences that are noted in
http://blogs.sun.com/divas/entry/getting_started_with_netbeans_ruby1

Chris K. wrote:

http://wiki.jruby.org/wiki/Getting_Started#Installing_and_using_Gems_in_JRuby).
that are noted in
http://blogs.sun.com/divas/entry/getting_started_with_netbeans_ruby1

Thanks Chris,

These are the sort of responses I am looking for. I will again check out
the links you have listed, although I have been there many times
already.
The situation as I see it is that the programmers and people close to
the project don’t always see the situation through “new” eyes.
My aim in this pursuit is to provide very simple examples that work,
with an end in site of discovering a “simple” method to deploy a JRuby
app from within Netbeans including a simple (possibly H2) database and
swing gui.
Info on the web and available documentation is full of comments like
“This tutorial does not teach you about JRuby” and “this example is for
rails but should work for JRuby” etc… and I believe that simple fully
explained explicit Netbeans JRuby examples would help in this matter.
Links to appropriate expanations as per above are essential in the
examples I have in mind. Typical of this is my quoting of the
definitions for GEM_Path and GEM_HOME from the help. To date this has
been a very messy area, and your point about not using the Ruby gem path
should be clearly understood.
The documentation for this very fast moving massive project will always
be difficult. The web is full of information that is out of date. I just
hope there is value to be had from simple examples that work, using the
latest versions. We can never have too many working examples.

Regards
Paul F.

ps You asked -
Q: I am also wondering why you clicked the Build button instead of the
Run button?
A: New users (including me) will probably click any button to see what
happens.

Paul F. wrote:

Chris K. wrote:

The situation as I see it is that the programmers and people close to
the project don’t always see the situation through “new” eyes.
That is why I am writing to you and asking questions. I want to see the
IDE through your eyes. So thanks for answering questions such as this
one:

Q: I am also wondering why you clicked the Build button instead of the
Run button?
A: New users (including me) will probably click any button to see what
happens.
I am thinking that being new to Ruby (coming from Java) you were
expecting that you needed to first build something. Is this right? or
not?

My aim in this pursuit is to provide very simple examples that work,
with an end in site of discovering a “simple” method to deploy a JRuby
app from within Netbeans including a simple (possibly H2) database and
swing gui.

I don’t know how out of date this tutorial is but I thought I would
point it out: http://wiki.netbeans.org/SwingJRuby

Chris K. wrote:

http://wiki.jruby.org/wiki/Getting_Started#Installing_and_using_Gems_in_JRuby).
I did not read the suggestion anywhere, I just assumed it would be
usefull to have access to the same gems for ruby and jruby but also
being aware that some of the mri gems will not work in JRuby. What do
you suggest as a typical setup?

Also the information at the end of the link is not suitable for netbeans
users, it suits the command line user. This is one of the points I am
trying to make.

http://blogs.sun.com/divas/entry/getting_started_with_netbeans_ruby1
Because I could, and I was surprised by the result. Is the gem produced
useful or just a useless artifact of the system?

Typical of a new users problems is the colon at the end of the trails
link above. Selecting the link (without removing the colon) results in
not found.
Also the information at the end of each of the above links is mind
bending in it’s complexity. The information is all there, but a new
user has no hope.

I trust you do not consider my comments as unfair criticism of your
efforts as I very much appreciate the massive efforts by all the
netbeans and jruby teams, but I feel that some of the potential for
netbeans & jruby together (forget rails, ruby & the command line) may be
lost if the entry is too difficult.
I am excited by the ruby front end to java and look forward to many
others being excited as well, especially in the desktop area.

Regards
Paul F.

The situation as I see it is that the programmers and people close to
the project don’t always see the situation through “new” eyes.

That is why I am writing to you and asking questions. I want to see
the IDE through your eyes. So thanks for answering questions such as
this one:

Not exactly new eyes, getting on a bit now, but coming from a Delphi
background I have been used to very easy gui deployment. The potential
is there with netbeans but new entrants have very fragmented information
which I believe a VERY SIMPLE WORKING example and explanation would
offer the carrot to keep going.

Q: I am also wondering why you clicked the Build button instead of
the Run button?
A: New users (including me) will probably click any button to see
what happens.
I am thinking that being new to Ruby (coming from Java) you were
expecting that you needed to first build something. Is this right? or not?
No, I would expect to be able to create a jar for the jruby project.
As mentioned I am fairly new to netbeans, java and ruby, about 12 months
now, but the going is still tough in some areas. I may sound a real
noob, but I am not in all respects, but I think the questions I am
asking need to be asked.
My aim in this pursuit is to provide very simple examples that work,
with an end in site of discovering a “simple” method to deploy a
JRuby app from within Netbeans including a simple (possibly H2)
database and swing gui.

I don’t know how out of date this tutorial is but I thought I would
point it out: http://wiki.netbeans.org/SwingJRuby
I have done quite a bit of work with swing (including a little with
monkeybars and profligacy) and I am flirting with scene graph also.
“Filthy Rich Clients” appeal to me. :smiley:

With the help of Jeremy from the sequel group I am very close to a
simple example using Sequel with H2 DB. By the way, sequel, once you
have got a sample working is fantastic for the JRuby (w/o rails & with
rails) user. Very easy to switch between database types and quite
intuitive.

My biggest area of concern is finding a simple explanation of a simple
method to deploy a JRuby project with all the required jars using an
installer of some sort for cross platform use on the desktop. Not
asking much, am I? :slight_smile:

No doubt with discussion of this type we should be able to put something
together.

Thanks
Paul F.

My biggest area of concern is finding a simple explanation of a
simple method to deploy a JRuby project with all the required jars
using an installer of some sort for cross platform use on the
desktop. Not asking much, am I? :slight_smile:

No doubt with discussion of this type we should be able to put
something together.

I am looking forward to your future blogs.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Tue, Aug 19, 2008 at 4:49 AM, Paul F. [email protected] wrote:

My biggest area of concern is finding a simple explanation of a simple
method to deploy a JRuby project with all the required jars using an
installer of some sort for cross platform use on the desktop. Not asking
much, am I? :slight_smile:

Isn’t that what Rawr does? http://rubyforge.org/projects/rawr/


Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Dick D. wrote:

On Tue, Aug 19, 2008 at 4:49 AM, Paul F. [email protected] wrote:

My biggest area of concern is finding a simple explanation of a simple
method to deploy a JRuby project with all the required jars using an
installer of some sort for cross platform use on the desktop. Not asking
much, am I? :slight_smile:

Isn’t that what Rawr does? http://rubyforge.org/projects/rawr/
Hi Dick,

Yes, but I think I am correct in saying that rawr has to start off as a
java project (Java main) with ruby files added.
I am looking for a pure JRuby method, perhaps I am just a masochist !
Although an excellent project, from my perspective, rawr is a little
complicated for noobs & dummies.
Something along the lines of
Deploying JRuby applications with Java Web Start may be
what I am after.
Also my target is only Netbeans with JRuby, not JRuby from terminal or
command line.
Maybe I am wrong, but the promise of JRuby/Netbeans I think is that we
should be able to write JRuby code in Netbeans, press a button and have
a jar ready to deploy.

Paul