+++ to secure your transactions use the Bitcoin Mixer Service +++

 

Ruby and Rails - plugin detail

Ruby for Netbeans provides all the basics expected from a full-featured Ruby IDE. Ruby for Netbeans also provides support for the Ruby on Rails web framework.

n/a
Plugin owner: enebo
Website:
Added: 2011-04-16
License: CDDL or GPLv2
Category: Programming Languages
Downloaded: 47,836 times
Rating:
 4.6, by 27 users

Plugin Log Show log

Versions available

Download plugin   Download size: 2.76 MB   Last Update: 2011-04-16

What's new in this version

This version has no new features per se, but it is the first version which is released under community support and not from the main Netbeans development team.

Verifications for NetBeans versions

7.0 verification PASSED See verification details
Download plugin   Download size: 2.76 MB   Last Update: 2011-04-16

What's new in this version

This version has no new features per se, but it is the first version which is released under community support and not from the main Netbeans development team.

Verifications for NetBeans versions

Plugin is not subject to any verification



Introduction

Ruby for Netbeans provides all the basics needed in a full-featured Ruby IDE:
  • Editing
    • Ruby Source
    • RHTML Source
    • YAML
  • Debugging
  • Refactoring
It also provides support for Rails 2.3.x. With this support you can:
  • Create a Rails application
  • Invoke all the basic operations of Rails from IDE controls (migrations, generators, etc...)
  • Basic support for deploying to glassfish web-server

[ You have to be logged in to be able to comment. ]

User Comments

  

Netbeans 7.2 Plugin Available

FYI: Just found the 7.2 ROR plugin available under a different name: ruby-rails.

Someone may want to combine them into one pluggin page.

For those who were looking for it here it is:

http://plugins.netbeans.org/plugin/44532/ruby-rails

Posted by robertleelittle on Dec 18, 2012
  

Re: Debugging can't get running

@euwero: debugging can be a pain to get running with ruby1.9. Some things to check:

1. The 'stable' debug gems don't work with ruby1.9. The best gems I've found are:

linecache19 v0.5.13 (which presumably you have)

ruby-debug-base19x v0.11.30.pre10 (install with: gem install ruby-debug-base19x --pre)

ruby-debug-ide v0.4.17.beta14 (install with: gem install ruby-debug-ide --pre)

You might need to uninstall the other debug gems in case they conflict.

2. You don't need anything in your Gemfile to get it to run, in fact I recommend you remove all those debug gems from it, because I had issues with bundler trying to install the --pre versions of the gems.


3. If you're using rvm, when you set up the ruby env in NetBeans' Project Properties, you need to get the paths exactly right. If you run NetBeans from the command line with the rvm env set up, it will auto-detect the env, but it auto-detects two envs, one of which isn't correct, so you need to figure out which one and delete it.
Posted by rockorequin on Dec 03, 2012
  

Variables in HEX format

Is there an option to see variables (while debugging) in HEX format?
Posted by michaelst on Nov 13, 2012
  

Debugging can't get running

My system:
$ uname -a
Linux pc 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ ruby -v
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]

$ rails -v
Rails 3.2.8

rvm -v

rvm 1.16.17 (master) by Wayne E. Seguin , Michal Papis [https://rvm.io/]

$ gem -v
1.8.24

NetBeansIDE 7.1.1
This plugin.

In Gemfile
gem 'linecache19', '0.5.13'
gem 'ruby-debug-base19', '0.11.26'
gem 'ruby-debug19', :require => 'ruby-debug'

ruby-debug-ide19 (0.4.12) installed.

After starting debugger I get:

/home/user1/RoR3Projekte/sde/script/rails
Fast Debugger (ruby-debug-ide 0.4.9) listens on :38457
/home/user1/.rvm/gems/ruby-1.9.3-p286/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:128:in `'
...
Uncaught exception: superclass mismatch for class RemoteInterface

Is there a solution to get debugging runnig for me.

Regards
Eugen
Posted by euwero on Nov 07, 2012
  

Re: Editor lockup during code completion

The first workaround I put in (check for Kind.EXACT and return without querying) prevents code navigation for classes from working, eg if I have a class called Test and CTRL-click on the word Test, netbeans doesn't open the test.rb file.

So a better workaround is to put this line in RubyIndex.java#search:

result.addAll(querySupport.query(key, name, kind, fieldsToLoad));

in a newly-started thread, and join to the newly-started thread with a timeout (eg 100 ms seems to be OK). If the new thread times out, the search query will still timeout waiting and still return, so the editor never locks up. And this seems to free up the newly-started thread within a second or two.

With this workaround, when you first type the dot after your class (eg "Test.") netbeans often doesn't show any code completion, but hitting CTRL-space usually makes the code completion appear.

The problem btw is set up during indexing but only appears when you try to do code completion. If I disable Kind.EXACT searches in indexing, the editor never hangs, and it never hangs during indexing if I don't disable them. If I disable them only during code completion, it usually hangs right after I type the dot after my class name.

Another btw: I fixed the issue where is does not not run the browser when you click on debug by setting only serverDebug to true in RailsActionProvider.java#runServer(final String path, final boolean debug).

Another btw: Would it be worth bundling JRuby 1.7 with the plugin instead of 1.6.6 ?
Posted by rockorequin on Oct 25, 2012
  

Re: Editor lockup during code completion

Additional to my last comment, I found when I did a clean-and-build that I also had to edit the properties for Ruby-Projects and add my repackaged o.jruby.complete project as a dependency, or it fails to compile.

And debugging doesn't work because RailsActionProvider.java#runServer(final String path, final boolean debug) sets both clientDebug and serverDebug to false, and the code that sets them to true is commented out (which begs the question, why?). Setting them to true allows debugging again.

Other issues I've noticed:

1. When the debugger runs, it doesn't open a browser; I have to manually navigate to localhost:3000.

2. When you first load a Rails3 project and set it to use a native ruby environment (I use the fast debugger ruby-debug-ide 0.4.17.beta14, ruby-debug-base 0.11.30.pre10), trying to run it complains that it can't find script/server. If you restart netbeans, it works, though, so it must be caching something. I think netbeans 7.1.2 also had this issue.
Posted by rockorequin on Oct 21, 2012
  

Re: Editor lockup during code completion

@enebo: Oh no, I was kind of hoping you would know how the nb indexing worked!

I fixed the build itself:

1. The first issue I hit was a 'dependent module junit4 is not installed' error, which is due to the bug http://netbeans.org/bugzilla/show_bug.cgi?id=198739. The workaround is to install netbeans as root, then run it once with "sudo -i /usr/local/netbeans-7.2/bin/netbeans" to make it install junit4 in /usr/local instead of your home folder.

2. After this, when I tried to build the project, it complained that the com-jcraft-jsch, org-apache-commons-httpclient, org-apache-commons-io modules were missing. The jar files for these are all in /usr/local/netbeans-7.2/platform/modules, and so I created library wrapper projects for them as described in http://deadlock.netbeans.org/hudson/job/faqsuck/lastSuccessfulBuild/artifact/other/faqsuck/build/faq.html#DevFaqWrapperModules. I also created wrapper libraries for com-jcraft-jzlib and org-apache-commons-logging. This was enough to get it to build, even though the Project Properties / Libraries complained about incompatible specification versions for the wrapper libraries.

3. The "package as NBMs" command created 22 plugins, but not the org-jruby-jruby.nbm module, which the "Ruby Projects" module required, so I couldn't install the plugins in Netbeans. I manually copied the jruby-complete-1.6.5.1.jar file from the o.jruby.complete project module to another folder, then deleted the o.jruby.complete project and made a new wrapper project for jruby-complete-1.6.5.1.jar with codebase org.jruby.jruby. After running "package as NBMs", all 23 NBM packages were created and I was finally able to install them.


Right now it seems to be all working (and not locking up), except that my breakpoints don't work, so I guess it's not connecting to the debugger properly. I'm using ruby-debug-ide 0.4.17.beta14 because the earlier version doesn't work with Rails3/ruby1.9 properly, but the nb-ruby plugin specified version 0.4.10, I think. Would that cause problems?
Posted by rockorequin on Oct 21, 2012
  

Re: Editor lockup during code completion

Did you copy jsch manually or have you fixed the build itself? I have continually gotten stuck with the current ant build and I am seriously considering converting this to a maven build since then dep management would be understood by most of us.

I don't know how nb indexing works at all but it is all built on top of core NB APIs so looking at what RubyIndex extends might help give a clue or two (I hope).
Posted by enebo on Oct 20, 2012
  

Editor lockup during code completion

The plugin was updated for 7.2 some time ago... it took me a long time to figure out how to build it (I got all sorts of errors like "junit4 is not installed", "com-jcraft-jsch, org-apache-commons-httpclient, org-apache-commons-io modules are missing", and it doesn't build the org-jruby-jruby.nbm plugin - I logged how I fixed all these in a comment at https://blogs.oracle.com/geertjan/entry/ruby_in_netbeans_ide_7).

When I finally got it working though, invoking code completion would invariably lock up the editor.

The problem is in the class RubyCodeCompleter where it calls RubyIndex: in the search method, the the line "result.addAll(querySupport.query(key, name, kind, fieldsToLoad));" at some point fails to return from the query method.

This appears to only happen if kind == Kind.EXACT, so adding the test "if (kind == Kind.EXACT) return true;" stops the lockup from happening.

But I guess this probably breaks something in the code completion. Does anyone know what is supposed to be happening and why it locks up, ie what would a proper fix be for this?
Posted by rockorequin on Oct 19, 2012
  

Yeah, this is known bug

@nichot20 yeah i know this plugin is still for 7.1. I talked with @enebo and he said he finding a solution for this problem. Stay tuned, and when new plugin is becomes available (and will not be imported to the NB plugin repo) I will update components on nbruby.
Posted by hron84 on Aug 18, 2012
  

7.2 has broken the plug in again...

Loved the http://nbruby.hron.me/updates/updates.xml Update centre, worked a treat for me.

Now though 7.2 is out, gave it a try, but the plugin refused to install due to lots of HTML editor version incompatibilities.. :(

This is a real shame as, along with others, I have found Netbeans to be the best IDE for Ruby.
Posted by nichot20 on Jul 31, 2012
  

Ruby / RoR shell

For anyone interested, I've created a simple console plugin to handle I/O via cmd.exe.

If you are on windows, this will let you run a terminal using the windows system prompt (cmd.exe) as your shell (e.g. for rails dev) without having to install anything else.

It is still a work in progress, but so far it serves my needs. Any help, bug fixes, comments or suggestions are more than welcome. Enjoy!

Download @ https://github.com/fungl164/JConsole
Posted by fungl164 on Jun 08, 2012
  

NBRuby Update Center

Until @enebo provides us a working release I created an Update center based on preview zip for this plugin to make installation easier.

To add this Update Center please do following:

1) Under Tools -> Plugins -> Settings, press Add
2) Fill Name with whatever you can recognize
3) Enter http://nbruby.hron.me/updates/updates.xml to the URL field
4) Press OK

Now you can select Ruby on Rails again in Plugins view.

This is contains exactly same content what @enebo provided us via community-ruby_7_1_preview1.zip just makes installation easier.
Posted by hron84 on Mar 30, 2012
  

Rspec

Has anyone been able to run rspec tests? I am on netbeans 7.1.1 and this is what I get when I run rspec


ruby/site_ruby/1.8/rubygems.rb:314:in `bin_path': can't find gem rspec (>= 0) with executable spec (Gem::GemNotFoundException)
from /usr/bin/spec:19
Posted by theyaa on Mar 29, 2012
  

Thin support

theyaa,

Adding thin support at the same level and mongrel or glassfish should be reasonably easy. Biggest issue in adding it is recognizing when it has fully started up. The rest looks easy.
Posted by enebo on Mar 28, 2012
  

7.1.1 okay!

zipped plugins on blog page from link below work for me on 7.1.1 -

Thanks a lot!!
Posted by groovehunter on Mar 28, 2012
  

Thin server

Is there a chance to add Thin server to the list of selectable servers? I read it is lighter and has better performance than Mongrel and WebRick.

Thanks
Posted by theyaa on Mar 26, 2012
  

Re: Abandoned

Actually, perhaps a better term is very slow vs abandoned. I'm sorry I did not see your earlier comment. The current progress is that it has been updated to use jruby 1.6.7 and it now also uses OSGi support so updating JRuby versions should become much much easier, but it is not fit for release.

This is an slightly older build, but this should allow you to install a working version on 7.1.1 as well as 7.1 (let me know if not):
http://blog.enebo.com/2012/01/workaround-for-ruby-support-on-netbeans.html

I will try to get something through QA soon :(
Posted by enebo on Mar 21, 2012
  

Abandoned

Sadly, it seems like this plugin have been totally abandoned. No one from the dev team comes here to respond to comments to post news about the progress on this plugin.

Developing RoR with netbeans has been the best out there. I hope the dev team will come back to provide us with help and eventually a new version of this plugin.
Posted by theyaa on Mar 21, 2012
  

Installation of Plugin de Ruby in NetBeans

Hello friendly they are new in NetBeans unloads version 7.1.1 and when installing plugin of Ruby gives the following error me:

Some plugins need that plugin Library of the Publishing HTML is installed.

Plugin Library of the Publishing HTML asks for in the version > = 1,21 (version 1 release) but 2.0.1 (of version different from 1) only were.

The following complement to fuer affected: Embedded Ruby (RHTML)

Posted by jduenas on Mar 21, 2012
  

This is for 7.1

The provided link below is for netbeans 7.1, is there a new one for 7.1.1.

Plus, the last update to this plugin is nearly 1 year ago, will you be releasing a new one?

Thanks
Posted by theyaa on Mar 09, 2012
  

Ruby and Rails plugin for NetBeans 7.1.1


http://blog.enebo.com/2012/01/workaround-for-ruby-support-on-netbeans.html
Posted by robomon on Mar 09, 2012
  

Support under NetBeans 7.1.1 ?

Hi all,

i tried to install this plugin but it didnt' work.
When will be a version for NB 7.1.1 available?

Regards
Andi
Posted by aschuste on Mar 06, 2012
  

Ruby and Rails plugin does not load on netbeans 7.1.1

I have this plugin working on netbeans 7.1, MAC. I installed netbeans 7.1.1 and when it launched it asked me if I want to import the settings from 7.1, I agreed but it did not import the settings. Any suggestions?
Posted by theyaa on Mar 05, 2012
  

Netbeans 7.1.1 is out.

Hi All,
Netbeans 7.1.1 is out, any updates to this plugin?

Thanks
Posted by theyaa on Mar 05, 2012
  

uninitialized constant Test::Unit::TestCase::SUBCLASSES

I am trying run unit test but it ends on this error:
/.netbeans/7.1/nb_test_mediator.rb:114:in `add_to_suites': uninitialized constant Test::Unit::TestCase::SUBCLASSES (NameError)

Google does not provide any solution :(
Posted by pepa.chmel on Feb 13, 2012
  

Rails 2.3 support on NB7.1?

I just tried to create project from existing source of 2.3.x and it still shows 3.x plugins in the gem list. But the command-line bundle exec and bundle install etc work fine with 2.3.

Doesn't the preview release of rails plugin on Netbeans 7.1 work with rails 2.3 apps anymore?
Posted by unicman on Feb 09, 2012
  

One of the sexiest plugins

I had to admit that Ruby and Rails for netbeans is one of the sexiest plugins for Rails. If not for the discontinuation of official Rails support for Netbeans from version 7, RubyMine and other paid IDEs for rails would have become extinct by now.
Posted by jbragadeesh on Feb 01, 2012
  

Profiler when starting mongrel

Why when I start mongrel on netbeans 7.1, the Profiler starts and the memory usage goes over the roof?
Posted by theyaa on Jan 23, 2012
  

Re: Nebeans memory

On my system I am seeing about 800Mb Real Memory being consumed and I have a lot open (things are snappy and quick for me). I will keep an eye out for any waste, but it might just be that netbeans allocates a large heap for better perf...if your machine does not have enough memory for that max heap then you start swapping and things slow way down. Possibly, reducing max heap could help if you are swapping a lot (memory getting saved to disk is much slower than more frequent GC'ing). I don't know how to reduce max heap off hand though...
Posted by enebo on Jan 18, 2012
  

Nebeans memory

Hi,
Netbeans 7.1+Ruby on Rails plugin uses 900MB RAM + Ruby takes around 230MB. That is a total of more than 1GB RAM and it renders netbeans very slow. Is there a way to reduce this usage and improve netbean's performance?

Thanks
Posted by theyaa on Jan 18, 2012
  

Re: Project right-click

Aha. I figured this out. I suspect this is because the Ruby platform you have associated with your Rails project does not exist. This is definitely a bug. Go to Tool menu and select Ruby Platforms and then click the Autodetect Platforms button. This should make it work again unless it does not autodetect the particular Ruby you were using with NB 7.0. There is an issue opened for this problem: http://netbeans.org/bugzilla/show_bug.cgi?id=198285
Posted by enebo on Jan 17, 2012
  

Project right-click

Thank you for the update, I have installed the plugin preview on netbeans 7.1 and imported my settings from 7.1 beta. Something I noticed, is that when I right-click on my project root, I do not get the context-menu.

Is that a bug or I missed something?
Posted by theyaa on Jan 17, 2012
  

Workaround to install preview build on NetBeans 7.1

I have a preview1 build which you can install on NetBeans 7.1. Please report any new issues which you run into in http://netbeans.org/bugzilla. Details can be found here:

http://blog.enebo.com/2012/01/workaround-for-ruby-support-on-netbeans.html
Posted by enebo on Jan 17, 2012
  

Release update

I was hoping to have things resolved last week but a issue popped up which will prevent getting uploaded to 7.1 catalog. By tomorrow (my time) I will provide a url for test 'test' nbms's for community-ruby for people to try out (these will for sure load in 7.1 and at least basic Ruby editing appears to be fine). Here is an issue to watch for progress on official release:

http://netbeans.org/bugzilla/show_bug.cgi?id=207025
Posted by enebo on Jan 16, 2012
  

Next Release

Anyone has a timeline on when the next release for this plugin, that will support netbeans 7.1, will be please?
Posted by theyaa on Jan 16, 2012
  

Vote for this plugin - Please

Everybody please take your time to vote for this plugin!

Why?

I think Netbeans is still the best ruby IDE. I have been testing rubymine every other month for a year now, but in terms of speed, stability and usability it is not an option.

If we get more votes on this, existing devs see that their work is appreciated and more developers might take a look on improving this plugin.
Posted by killerg on Jan 15, 2012
  

Creation of new project - fails

The old problem for Windows XP OS detected by me still in Netbeans 7.0 exists. When creating a new Ruby or Rails project, the wizard stays frozen at 25% of progression. The only way to quit - is to kill the application via Task Manager pane. After restarting Netbeans, the project that failed before can be opened without problems.
Posted by javix on Jan 13, 2012
  

Creation of new project - fails

The old problem for Windows XP OS detected by me still in Netbeans 7.0 exists. When creating a new Ruby or Rails project, the wizzard stays frozen at 25% of progression. The onky way to quit - is to kill the application via TAsk Manager pane. After restarting Netbeans, the project that failed before can be opened without problems.
Posted by javix on Jan 13, 2012
  

Ruby and Rails with Git

In my case I need to use Git + Ruby and Rails plugin. Git does not work properly with 7.0.1 and that is why I had to go with 7.1 Beta. It is working fine, but tooooo slow and that is in part becuase of the GC in netbeans. This is why I am impatiently waiting for the updated version of this plugin so I can use it with 7.1.

Thanks
Posted by theyaa on Jan 12, 2012
  

Installation question

How to install the plugin after downloading the zip file, please? In the previous 7.0.1 version the plugin was in the plugins list, it is no more the case in Netbeans 7.1 version. Any idea how to try it?
I unzipped the archive and tried to install all the included *.nbm files separately, one by one. The problem is with RHTML plugin:

The plugin HTML Editor Library is requested in version >= 1.21 (release version 1) but only 2.0.1 (of release version different from 1) was found.
There are still 5 plugins (of 25 available in the zip) uninstalled because of that. More of that, even those which were installed without any errors are not displayed in the installed plugins tab.
Posted by javix on Jan 12, 2012
  

RE: Recommended Netbeans Version

@theyaa i am using the 7.0.1 as a base version. And since i am having som php projects too i choose the php suite. But this does not really matter as you need to install the plugin anyway. So you can also take the java or c version.
Posted by killerg on Jan 12, 2012
  

Recommended Netbeans Version

When downloading Netbeans, several versions are presented. Before, there was a specific version for Ruby, but now we need to choose a different version to run the ruby and rails plugin with it. Which version of Netbeans is the recommended to download to work with Ruby on Rails plugin?

Thanks
Posted by theyaa on Jan 12, 2012
  

RE: Netbeans 7.1 Beta

@enebo this is a good news, i am very excited...
Posted by hron84 on Jan 12, 2012
  

RE: Netbeans 7.1 Beta

I am getting close to submitting a version which works well with Netbeans 7.1. I don't have any idea why it would be so slow in 7.1 beta unfortunately.
Posted by enebo on Jan 10, 2012
  

Netbeans 7.1 Beta

I have ruby and rails plugin running on Netbeans 7.1 Beta but, it is very slow and takes several seconds to respond to user strokes. Is there any anyways to improve the performance of netbeans with this plugin, since the plugin does not work with 7.1 later versions yet?

Thanks
Posted by theyaa on Jan 10, 2012
  

NB 7.1 support

I will give it my best to eliminate the HTML editor problems not allowing NB 7.1 to load Ruby support very soon. Sorry it has not happened already.
Posted by enebo on Jan 06, 2012
  

Netbeans 7.1 is not supported

Why isn't 7.1 supported yet? This is very frustrating.
Posted by japanick on Jan 06, 2012
  

Netbeans 7.1

Anyone has an update on using this plugin with netbeans 7.1 please? When I install 7.1 I can not install this plugin, it gives me several errors.
Posted by theyaa on Jan 05, 2012
  

Great keep us posted!

Great keep us posted!
Posted by patkoscsaba on Nov 28, 2011
  

@patkoscsaba

There is some work underway to update nbruby to use 7.{01} APIs instead of relying on deprecated 6.9 APIs. It will also update Ruby parser for better 1.9 support. Ran into some issues during the upgrade which needs to get worked out.
Posted by enebo on Nov 28, 2011
  

Any update for NetBeans 7.1?

Are there any plans or available development versions which are working with NetBeans 7.1 nightly?
Posted by patkoscsaba on Nov 28, 2011
  

uninitialized constant Rake::DSL error when creating a project

That's what i get when trying to create both ruby and rails projects. tried reinstalling both ruby interpreter and netbeans but it didn't help. (Windows 7, Netbeans 7.0.0, Ruby 1.9.2)
Posted by thyforhtian on Jul 13, 2011
  

Congrats!

I'm just happy to see this into community hands this fast! I just hoped they did the same with UML plugin... Hopefully the code is in better shape that UML is.

Keep up the good work!
Posted by javydreamercsw on May 11, 2011
  

Re: HTML 5

@charlesdeb

That is likely true. I am not yet familiar with how basic HTML support ties into Erb editing (it might just work with newer HTML module), but anything tangential to specific Ruby modules will just work. For NB 7, I mostly upgraded to keep up on top of the new Java features and basic IDE enhancements (I use both Ruby and Java daily).
Posted by enebo on May 07, 2011
  

HTML 5

Am I right in saying that the reason I would use this plug-in and NB 7 in lieu of the NB 6.9.1 with the old RoR module that used to be provided by the NB teams is so that I can take advantage of new features in NB that are relevant to RoR developers - e.g. HTML5 parsing?
Posted by charlesdeb on May 05, 2011
  

Re: Ruby And Rails Installation info request

@dant

This will work on NB release 6.9 or 7.0 (there is a version field above that specifies this).

It ships with an older version of JRuby (next version of this plugin will update to current version of JRuby), but you will need to install Ruby outside of Netbeans if you don't want to use that JRuby version and then you can add additional ruby runtimes that nb knows about in preferences (this is similiar to how nb handles versions of Java if you have ever changed that).
Posted by enebo on May 02, 2011
  

Ruby And Rails Installation info request


How can Ruby And Rails be installed and does
this plugin run on Netbeans release 7.0?
Posted by dant on May 02, 2011
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo