X

Geertjan's Blog

  • June 13, 2013

Ruby on Rails in NetBeans IDE 7.3.1

Geertjan Wielenga
Product Manager

NetBeans IDE 7.3.1 is released, hurray, etc. Now let's look at using Ruby on Rails in NetBeans IDE 7.3.1.

Go here, to the NetBeans plugin for JRuby maintained by Tom Enebo and the JRuby community (since there really isn't anyone better in the world to be responsible for a tooling plugin than the community itself) and click the Download button:

http://plugins.netbeans.org/plugin/38549/ruby-and-rails

Now you have a ZIP file. Unzip it. Go to Tools | Plugins in NetBeans IDE 7.3.1. Select all the NBMs from the unzipped file. Make very sure to change the "Files of Type" filter to "All", so that you can include the JRuby JAR, which you must have, otherwise the NBMs will not be able to be installed. I.e., you can include the JAR, as shown below, which is in the ZIP file, but, again, make sure to change the filter from the default, so that not only NBM files are selectable.

When you click Install above, you'll see this dialog, just accept what it tells you:

Once the installation is complete, go to File | New Project and there you'll see the Depot Application, which is a nice sample to get you started:

Now you have a full-blown and very fast/smooth editor for your code (click to enlarge the image below):

You can configure a bunch of things in the Project Properties dialog, i.e., per project:

Also, there are IDE-wide configuration settings you can configure in Tools | Options:

And, aside from the sample shown above, there are various starting points for your own applications:

So dive in today, the water is good!

Join the discussion

Comments ( 22 )
  • Gerry Tuesday, July 2, 2013

    I have installed netbeans 7.3.1 plus the 7.3 version of the ruby plugin.

    I want to work with my installed versions of ruby (1.9.3 p429) and rails (4.0.0). I've added the platform for that, and everything seems OK. I can create a new project with no problems and add and edit files, but none of the generators work.

    Is there a step I'm missing? (I am very new to this)


  • guest Friday, July 5, 2013

    I'm getting the error that the system cannot find the path specified ../script/rails. I'm new to netbeans. Any help would be greatly appreciated. Thank you.


  • guest Tuesday, July 9, 2013

    Thanks for this, it's very helpful. The only thing I'm a bit stumped on is how to import an existing ruby project. Can you you help with that?

    BTW - total Netbeans noob.


  • guest Saturday, July 13, 2013

    Very helpful! Thanks!


  • AC Friday, August 16, 2013

    How can I import an existing non Netbeans Rails project into Netbeans 7.3?


  • guest Friday, August 16, 2013

    You can import an existing Ruby project by going to New Projects. Click on Ruby and on the right hand pane one of the four option will be Rail from Existing sources.


  • guest Thursday, August 29, 2013

    PROBLEM Netbeans wont fire up webrick when rails 4.0 installed.

    /home/francis/ruby/bin/ruby: No such file or directory -- script/rails (LoadError)

    SOLUTION script directory has been moved to bin

    $ ln -s ./bin ./script

    The above is a work around until the Ruby plugin is updated to support both

    script/rails and bin/rails.


  • koopee Wednesday, September 18, 2013

    Thanks! I've been using Netbeans 6.9.1 for rails compatibility until now I had to switch to a more recent Subversion client and then needed more recent Netbeans...

    Really worked like a charm! :)


  • guest Sunday, September 29, 2013

    Hi bro thanks alot working absolutely fine ........

    lots of thanks and love....

    it means alot for me

    bye have a nice life


  • guest Friday, October 18, 2013

    Thanks!

    This plugin and procedure also worked for me in NetBeans IDE 7.4 under Ubintu 13.10


  • Francis Trujillo Wednesday, October 30, 2013

    I am using NB 7.3.1 and successfully installed Ruby plugin. Thanks.

    PROBLEM => Can not use any NB functionality with RAKE TASKS. Error shows unknown option -A. No clue.

    $ ruby --version

    ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]

    $ rake --version

    rake, version 10.1.0


  • guest Saturday, December 14, 2013

    Thanks a LOT for that post.. you really helped me out!


  • Ajay singh rathore Friday, January 10, 2014

    Need information regaring tutorial of ROR 2 on windows 7 with Netbean.

    Can you help me in this ?

    Thanks

    ASR


  • guest Wednesday, January 22, 2014

    some body help me, my email is luonghoangkhai@gmail.com

    C:\Ruby200\bin\ruby.exe: No such file or directory -- script/rails (LoadError)


  • guest Thursday, January 30, 2014

    After installing the plug-in when I try to create tables for the depot application (Migrate Database > To Current Version), I get the following error:

    rake aborted!

    no such file to load -- db/migrate//001_create_products.rb

    The file is very much there. Looks like an extra '/' is there. Seems to come from some rake script. Any help is appreciated.


  • Geertjan Thursday, January 30, 2014

    Stop using NetBeans IDE 7.3.1 and stop using the Ruby plugin for that. In both cases, use NetBeans IDE 7.4 and the related plugin instead. Also, here's Tom's blog, leave messages there instead of here, since Tom created the plugin and not me: http://blog.enebo.com/


  • guest Thursday, January 30, 2014

    After installing the plug-in when I try to create tables for the depot application (Migrate Database > To Current Version), I get the following error:

    rake aborted!

    no such file to load -- db/migrate//001_create_products.rb

    The file is very much there. Looks like an extra '/' is there. Seems to come from some rake script. Any help is appreciated.


  • Geertjan Thursday, January 30, 2014

    Stop using NetBeans IDE 7.3.1 and stop using the Ruby plugin for that. In both cases, use NetBeans IDE 7.4 and the related plugin instead. Also, here's Tom's blog, leave messages there instead of here, since Tom created the plugin and not me: http://blog.enebo.com/


  • guest Thursday, January 8, 2015

    Sir/Madam

    i am new to Ruby on rail mu questions is

    1) how to i create a project in ruby

    2) how to run on a browser

    plz tell me step by step


  • guest Monday, April 6, 2015

    Sir/Madam

    Are this plugins are compatible in netbeans 8.0?


  • guest Monday, April 6, 2015

    Yes.


  • Geertjan Monday, April 6, 2015

    What happens when you type "Ruby" and "NetBeans IDE 8.0" into Google?


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.