Ruby on Rails in NetBeans IDE 7.3.1

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!

Comments:

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)

Posted by Gerry on July 01, 2013 at 09:35 PM PDT #

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.

Posted by guest on July 05, 2013 at 05:31 AM PDT #

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.

Posted by guest on July 09, 2013 at 01:49 AM PDT #

Very helpful! Thanks!

Posted by guest on July 13, 2013 at 04:19 AM PDT #

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

Posted by AC on August 16, 2013 at 07:16 AM PDT #

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.

Posted by guest on August 16, 2013 at 07:23 AM PDT #

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.

Posted by guest on August 28, 2013 at 07:09 PM PDT #

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! :)

Posted by koopee on September 18, 2013 at 02:50 AM PDT #

Hi bro thanks alot working absolutely fine ........
lots of thanks and love....
it means alot for me

bye have a nice life

Posted by guest on September 29, 2013 at 12:25 AM PDT #

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

Posted by guest on October 18, 2013 at 12:36 PM PDT #

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

Posted by Francis Trujillo on October 30, 2013 at 12:38 PM PDT #

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

Posted by guest on December 14, 2013 at 03:25 AM PST #

Need information regaring tutorial of ROR 2 on windows 7 with Netbean.
Can you help me in this ?

Thanks
ASR

Posted by Ajay singh rathore on January 10, 2014 at 02:20 AM PST #

some body help me, my email is luonghoangkhai@gmail.com
C:\Ruby200\bin\ruby.exe: No such file or directory -- script/rails (LoadError)

Posted by guest on January 21, 2014 at 07:05 PM PST #

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.

Posted by guest on January 29, 2014 at 11:43 PM PST #

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/

Posted by Geertjan on January 30, 2014 at 02:17 AM PST #

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.

Posted by guest on January 30, 2014 at 07:43 AM PST #

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/

Posted by Geertjan on January 30, 2014 at 08:54 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today