Netbeans, Eclipse and ruby! How to...?

well, i should start to say that i’m pretty new to ruby!!
I’m trying to set up a IDE to ruby, and I began with Eclipse. I used the
ruby installer to install ruby, i installed eclipse and rdt. The problem
came when I tried to ‘puts “Hello World”’. The eclipse console said
something like this:
“C:\ruby\bin\ruby.exe: No such file or directory…” But I was able to
run ruby files in cmd!!!
I tried looking in google for people with the same problem, but never
found.
More recently I installed netbeans 6.0 milestone 10. when using the
native ruby (not the one that comes with the netbeans) i have the
exactly same message:
“C:\ruby\bin\ruby.exe: No such file or directory…”
The file exists!! I mean, i run ruby files in CMD!!
I’m running windows vista ultimate.
Please, i’d appreciate some help!

I’ve setup both Eclipse+Ruby and Netbeans 6.0 Milestone 10 :slight_smile: they
both work ok, though I only use jruby in (E)clipse, not native, so I
can’t help there.
A lot of the web pages that purport to walk you though a E+ruby
install are woefully out of date, so I’ll try and recount what I had
to do.

For E
OK so install E and ruby, order doesn’t matter.

Then you need to go to the software updates section (I think it’s in
the help menu). If you’re behind a proxy you need some funky config
first, in which case you’ll have to google.

I think you run the update to get a list of all of the plugins, then
look through the (huge) list to find “Ruby Development Tools”. That’s
the thing to install!

After it’s installed, you have to go to the preferences (under the
window menu), find ruby in the tree, and tell it where the interpreter
is.

Good luck!
–Kyle

Ok, my mistake!!! I forgot to tell you that I’ve done that!!! In both
Eclipse and Netbeans, I tell them where the ruby interpreter is! Mine is
C:\ruby\bin\ruby.exe
I’m terribly sorry for not telling the “whole story”.

Like you said, the pages about setting up a configuration for ruby and
eclipse are very bad, if non-existing. Even worst (obviously) for
netbeans 6 milestone 10.

So, the problem is that both IDEs, seem not to be able to “use” the ruby
interpreter, after I tell them explicitly where it is:
“C:\ruby\bin\ruby.exe: No such file or directory…”
Is it a Vista problem???

Anyway, thank you Kyle and, once more, sorry.

Kyle S. wrote:

I’ve setup both Eclipse+Ruby and Netbeans 6.0 Milestone 10 :slight_smile: they
both work ok, though I only use jruby in (E)clipse, not native, so I
can’t help there.
A lot of the web pages that purport to walk you though a E+ruby
install are woefully out of date, so I’ll try and recount what I had
to do.

For E
OK so install E and ruby, order doesn’t matter.

Then you need to go to the software updates section (I think it’s in
the help menu). If you’re behind a proxy you need some funky config
first, in which case you’ll have to google.

I think you run the update to get a list of all of the plugins, then
look through the (huge) list to find “Ruby Development Tools”. That’s
the thing to install!

After it’s installed, you have to go to the preferences (under the
window menu), find ruby in the tree, and tell it where the interpreter
is.

Good luck!
–Kyle

Ewww. Maybe? I’m running Eclipse on Windows & Netbeans on windows &
Linux…never seen that problem.

–Kyle

NetBeans M10 is ancient history - try the latest build from

http://deadlock.netbeans.org/hudson/job/ruby/

There is bunch of wiki pages with a lot of information about hopefully
everything important:

http://wiki.netbeans.org/wiki/view/Ruby

in this case, particularly:

http://wiki.netbeans.org/wiki/view/RubyInstallation

But as James said M10 is really ancient and better to use a piece from:

http://deadlock.netbeans.org/hudson/job/ruby/

If you encounter any problem let us know:

http://wiki.netbeans.org/wiki/view/RubyFeedback

Or contact directly. Feedback is always appreciated.

Regards,
m.

Ok.
When I say that there’s not many information, I mean not beeing able to
find good information from “non-official” channels. I mean, in a place
like the Internet what you gave me is not “a lot of” nothing. But, of
course, we’re talking about new things, Netbeans 6 is very new, so we
can´t expect a lot of specialized information…but not in the case of
Eclipse! But please, let me say again that I’m no expert so I (probably)
could have “thrown” away some good information that crossed me, just
because it seemed very complicated to me :frowning:

So, I went to the pages you gave me.
There it says that if I want to use native ruby, there’s only one simple
thing to do: go to the options and select the ruby interpreter. I’ve
already done this.
By the way, I have ruby 1.8.6 installed. (In C:\ruby) Dont know if this
is important.

To update, i followed what is said in
http://wiki.netbeans.org/wiki/view/RubyInstallation#section-RubyInstallation-ConfiguringTheUpdateCenter
but i still had no updates in the Netbeans’ plugin manager.
So I’m thinking i have the latest release of what I have installed.

I noticed something in that same page, when talking about gems
http://wiki.netbeans.org/wiki/view/RubyInstallation#section-RubyInstallation-InstallingNativeRuby
it says that the IDE must have write permissions so we can use gem
manager with native ruby.
Might this be my problem? I mean, when trying to run ruby, netbeans does
not have write permissions and so i cant run ruby programs??
If so, what should I do? Is this the same problem with Eclipse?

Thank you.

André Cardoso wrote:

Ok, my mistake!!! I forgot to tell you that I’ve done that!!! In both
Eclipse and Netbeans, I tell them where the ruby interpreter is! Mine is
C:\ruby\bin\ruby.exe
I’m terribly sorry for not telling the “whole story”.

Like you said, the pages about setting up a configuration for ruby and
eclipse are very bad, if non-existing. Even worst (obviously) for
netbeans 6 milestone 10.

There is bunch of wiki pages with a lot of information about hopefully
everything important:

http://wiki.netbeans.org/wiki/view/Ruby

in this case, particularly:

http://wiki.netbeans.org/wiki/view/RubyInstallation

But as James said M10 is really ancient and better to use a piece from:

http://deadlock.netbeans.org/hudson/job/ruby/

If you encounter any problem let us know:

http://wiki.netbeans.org/wiki/view/RubyFeedback

Or contact directly. Feedback is always appreciated.

Regards,
m.

On 9/7/07, James M. [email protected] wrote:

Every morning after coffee,
I blow away my NetBeans directory and copy over the latest build

What I really do is a cron job that runs this script on a linux box at
6am:

bld=wget -q -O - 'http://deadlock.netbeans.org/hudson/job/ruby/lastSuccessfulBuild/buildNumber'
wget -P /home/james/Desktop
http://deadlock.netbeans.org/hudson/job/ruby/lastSuccessfulBuild/artifact/ruby/rubyide/dist/netbeans-rubyide-hudson-$bld.zip
cd /home/james/Desktop
rm -rf nbrubyide
unzip “netbeans-rubyide-hudson-$bld.zip”

That’s on a samba-exported directory, and I just copy over that.
Vista’s unzip utility is pathetically slow, and while Vista might have
a cron-like feature, I have no idea how to to use it.

On 9/7/07, André Cardoso [email protected] wrote:

To update, i followed what is said in
http://wiki.netbeans.org/wiki/view/RubyInstallation#section-RubyInstallation-ConfiguringTheUpdateCenter
but i still had no updates in the Netbeans’ plugin manager.
So I’m thinking i have the latest release of what I have installed.

I’m about as unofficial as you can get, sorry :-).

I have no idea how you update NetBeans, and I wouldn’t assume that any
automated systems are really hooked up yet (happy to be corrected on
that, though - it’d be more convenient). Every morning after coffee,
I blow away my NetBeans directory and copy over the latest build from

http://deadlock.netbeans.org/hudson/job/ruby/

I happily run on Vista, too, with the interpreter set to

C:\InstantRails\ruby\bin\ruby.exe

(But there are some mornings where you might suffer a bit. I’m having
a problem with today’s editor, unfortunately.)

James M. wrote:

On 9/7/07, Andr� Cardoso [email protected] wrote:

To update, i followed what is said in
http://wiki.netbeans.org/wiki/view/RubyInstallation#section-RubyInstallation-ConfiguringTheUpdateCenter
but i still had no updates in the Netbeans’ plugin manager.
So I’m thinking i have the latest release of what I have installed.

I’m about as unofficial as you can get, sorry :-).

I have no idea how you update NetBeans, and I wouldn’t assume that any
automated systems are really hooked up yet (happy to be corrected on
that, though - it’d be more convenient). Every morning after coffee,
I blow away my NetBeans directory and copy over the latest build from

http://deadlock.netbeans.org/hudson/job/ruby/

I happily run on Vista, too, with the interpreter set to

C:\InstantRails\ruby\bin\ruby.exe

(But there are some mornings where you might suffer a bit. I’m having
a problem with today’s editor, unfortunately.)

Well, i’ve uninstalled netbeans and ruby.
Like you told that you had netbeans working fine with instant rails,
i’ve decided to try that.
I’ve downloaded latest releases of instant rails and netbeans and
installed them.
netbeans works fine when running ruby with the jruby interpreter. But
when I go to the options, and switch the jruby with the ruby interpreter
that came with instant rails (C:\InstantRails\ruby\bin\ruby.exe) i get
the same message :
“C:\InstantRails\ruby\bin\ruby.exe: No such file or directory –
C:/Users/Belerophons/Documents/NetBeansProjects/RubyApplication1/lib/main.rb
(LoadError)”

WHAT IS GOING ON HERE!!!Please help me lol.Seriously…

By the way, I have not the ruby interpreter of instant rails in the PATH
of the system. Can this be a problem???
Please help me. Does anybody else has this problem???

Thank you.

James M. wrote:

http://deadlock.netbeans.org/hudson/job/ruby/

The thing that turned me off of netbeans almost immediately was this: I
wanted to open a buffer to paste in some temporary stuff. NetBeans
forced me to decide (a) what kind of file this was (had to navigate the
list to “empty file”) and (b) where to save it. I don’t want to save it.
I just want a buffer to munge some data in.

Am I missing something?

I guess I could have opened a text editor outside netbeans, but that
would mean switching mental gears and using a different set of editor
commands.

James M. wrote:

Exactly when do you get that message? (What menu option/keystroke do
you use to run? There are a bunch of ways to do this.)

My guess - you’ve got a Ruby project (as opposed to a Ruby on Rails
project - they’re different), and NetBeans expects to run lib/main.rb
when you use ‘Run main project’

Try just running the individual file you’re looking at - Run menu >
Run file > Run “your_file_name.rb”

Also, you’re probably going to get more help on specific netbeans
issues from [email protected] than here on ruby-talk.
Join/archives here:
http://ruby.netbeans.org/servlets/ProjectMailingListList

These were my steps(after changing jruby to
C:\InstantRails\ruby\bin\ruby.exe in the options of netbeans):

1º: File|new project|ruby application|…by the end i get two
automaticaly generated files, rakefile.rb and main.rb;
Main.rb has just one line of code, 'puts “Hello World” ';

2º With the main.rb opened, i click with the right button in the editor
and select “Run File”, which is equal to press “Shift+F6”;

The following message appears after those steps:
“C:\InstantRails\ruby\bin\ruby.exe: No such file or directory –
C:/Users/Belerophons/Documents/NetBeansProjects/RubyApplication3/lib/main.rb
(LoadError)”

Thank you for the link. I will check it later!!

But don’t you think that if the message I get now, with Netbeans, is the
same I got the with Eclipse, this might be not a netbeans issue but
something about Vista and Ruby?

Thank you.

Have you tried Getting Started - first steps with Eclipse Shell ?

“André Cardoso” [email protected] wrote in message
news:[email protected]

Ok.
Its done. lol. And I’m not happy for having discovered the reason…
Like I said, I get the following message:

“C:\InstantRails\ruby\bin\ruby.exe: No such file or directory –
C:/Users/Belerophons/Documents/NetBeansProjects/RubyApplication3/lib/main.rb
(LoadError)”

I thought the “no such file…” was referring to the ‘ruby.exe’. But no.
It was referring to the ‘main.rb’!!! This was happening 'cause the path
was wrong:
it’s not “C:/Users/Belerophons…” BUT “C:/Users/Belerophon’s…”
…!!!
Netbeans seems not to understand the special character < ’ >!!!

So, it’s my fault! :frowning: It was really a bad idea to put special
chareacters like < ’ > in my user account!!!

I’ve changed my user account name to simply “Belerophons” and now
Netbeans seems to be working fine…at least it appeared “Hello World”
in the console :D.

Thank you all who replied to my posts!!! And sorry for the stupid reason
that was behind the problem - I should have seen this sooner!!!

Thank you.
André.

On 9/8/07, André Cardoso [email protected] wrote:

i get
the same message :
“C:\InstantRails\ruby\bin\ruby.exe: No such file or directory –
C:/Users/Belerophons/Documents/NetBeansProjects/RubyApplication1/lib/main.rb
(LoadError)”

Exactly when do you get that message? (What menu option/keystroke do
you use to run? There are a bunch of ways to do this.)

My guess - you’ve got a Ruby project (as opposed to a Ruby on Rails
project - they’re different), and NetBeans expects to run lib/main.rb
when you use ‘Run main project’

Try just running the individual file you’re looking at - Run menu >
Run file > Run “your_file_name.rb”

Also, you’re probably going to get more help on specific netbeans
issues from [email protected] than here on ruby-talk.
Join/archives here:
http://ruby.netbeans.org/servlets/ProjectMailingListList