Ruby on Rails: getting netbeans IDE [some struggle]

Apparently installation of Netbeans wih RoR is supposed to be
a piece of cake;

Following installed netbeans (but without RoR support):

sudo-apt get install netbeans

Here are plugins to enable RoR. Alternatively you can
download whole package "all" from Sun's website:
http://dlc.sun.com.edgesuite.net/netbeans/6.9/rc/ .
Got from there: netbeans-6.9rc2-ml-linux.sh.
Before execution make sure you have root password set.

sudo passwd root  # set your root password
chmod u+x netbeans-6.9rc2-ml-linux.sh
./netbeans-6.9rc2-ml-linux.sh

This should install properly whole Netbeans. Now running
netbeans... let's go to Menu:
-> File -> New Project -> Ruby -> Ruby on Rails Application
This gave me some choice between JRuby 1.1.6 and built-in
JRuby 1.5-something and finally Ruby 1.8 I installed myself
previously.

The problem I had with my installation was that everytime
I tried to used Jruby 1.1.6 - Rails installation gave me following:

ERROR:  Error installing rails:
	rake requires RubyGems version >= 1.3.2

It was not really true, as I had latest RubyGems but only for
my own platform. Jruby 1.50 detected properly Rails and generated
rails directory structure. However after that running server
next problems. No matter what server was run - it was always
Glassfish running don't know what files. I created controller
do and properly implemented views look at
but server still did not recognize anything properly - returning
"Error".
I came back to use my version of ruby 1.8.7 and during last
step of setting up new project - I got:

Rake tasks fetch failed with (working: directory: /home/wkaczurba/NetBeansProject/RailsApplication2).  

rake aborted!
No Rakefile found /usr/lib/ruby/1.8/rake.rb:2237:in 'raw_load_rakefile'


No worries.. just see if rails work at all:



rails newprj
/usr/lib/ruby/1.8/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.8/active_support.rb:56
from /usr/share/rails-ruby1.8/railties/bin/../lib/rails_generator.rb:28:in `require'
from /usr/share/rails-ruby1.8/railties/bin/../lib/rails_generator.rb:28
from /usr/share/rails-ruby1.8/railties/bin/rails:14:in `require'
from /usr/share/rails-ruby1.8/railties/bin/rails:14


This is acutally where story ends...


Fixing issues


Installed rvm (see Ruby on Rails: rvm [some struggle]) helped. After installing and choosing ruby under rvm - add ruby

interpreter into Netbeans when creating project (to find project use console: which ruby).