Monday, January 16, 2012

Workaround for Ruby support on Netbeans 7.1

Firstly, I messed up. I should have had community-ruby ready for NetBeans 7.1 general release. For all the problems I created for you all, I apologize.



Secondly, The main issues with getting a good release of community-ruby in the catalog for NB 7.1 are:



  1. https://netbeans.org/bugzilla/show_bug.cgi?id=207075 -- Some infrastructure broke which makes it impossible to release at the moment. This may seem like the big problem but in fact….
  2. Netbeans 7.1 updated some components (as software is known to do). One of those components was html.editor.lib. Ruby support was dependent on version 1, but NetBeans 7.1 only ships version 2 now. This is the main reason why the Ruby support from 7.0 is un-installable on 7.1.
I have addressed item 2 enough already to make it installable on NetBeans 7.1. In fact, so far I have:

  1. Updated internal JRuby shipped to 1.6.5.1 (from 1.1.4). It also means update JRuby internals for pieces of community-ruby which depends on JRuby internally. This is a good thing for the future of community-ruby. On top of that, it also gave me a really good idea of what we need to change in JRuby itself to help make JRuby more modular.
  2. Updated community-ruby to compile on Java 7
  3. Changed some no longer compilable unit test base classes to again compile. yay. Unfortunately, there are some regressions to be fixed. But we now have ci builds generating reasonable results again.
If you are interested in installing what I am calling preview1, then grab the preview zipfile. Once you have this file, unzip it (note location) and then within Netbeans 7.1 you can:

  1. Select Tools->Plugins from menu
  2. Select Downloaded tab
  3. Press Add Plugins...
  4. Navigate to where you unzipped the nbms files
  5. Select all files which end in .nbms (you can do this all in one selection but if you include any non-nbms file it greys out the open button)
  6. Accept and install…
Hopefully by the time 207075 is fixed, I will have things greener on the ci builds and also have the dreaded Rails hanging bug fixed. For tracking the official release of community-ruby you can watch bug 207025

53 comments:

  1. Thanks Thomas for all the efforts !!

    ReplyDelete
  2. Thank you for all the work you do on ruby support for netbeans, I use it every day!

    Remco

    ReplyDelete
  3. Looking forward to checking this out. Been stuck on 6.9 for a while now.

    ReplyDelete
  4. Thanks for the work on this important piece of software.

    ReplyDelete
  5. THanks a lot Thomas for such a great effort!

    ReplyDelete
  6. All the best! Keep up the good work.

    ReplyDelete
  7. ROCKS!!!! ... Works on Debian, reads Rvm rubies and Rails 3 basics works...

    ReplyDelete
  8. Please I need help for debugging. I have installed ruby-debug-ide but it's impossible to debug. I just get a "could not connect to web server - http://localhost:3000"
    Any advices?
    Thanks.

    ReplyDelete
    Replies
    1. Hi Alfredo,I am also trying to find solution for it.Looks like we need to modify the startup script for netbeans.I have tried but still no luck.Please let me know if you have resolved this.

      Thanks,
      Dev

      Delete
    2. maybe u havent turned on the WEBrick server. just guessing

      Delete
  9. Thank you very much. I am still using NB 6.9 for Rails development. Hope to move to NB 7.1 thanks to you.

    ReplyDelete
  10. Thanks a lot! Works like a charm now in 7.1 the only drawback is that you still cannot change the syntax checker to ruby 1.9 - for non raily ruby development.

    ReplyDelete
  11. Such a great IDE, Many Thanks for keeping this going.

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. I don't normally post on these. Thank you SO MUCH for the 7.1 fix. I now have 1 ide for almost all I do. THANK YOU SO MUCH!!!!!

    ReplyDelete
  14. Thanks so much for the great work you've done on the plugin. I'm finally working fulltime with Ruby and Rails on a project, and this really is the best IDE (for Linux) I've used.

    ReplyDelete
  15. Many thanks Tom, now I can work with nb 7.1 on rails applications (I,m currently on ruby 1.8.7 / rails 2.1.2 and it works great, debug works too...)

    ReplyDelete
  16. Thank you very much Tom, for this greatest ruby IDE.
    Using it with 1.8.7, and with rails 3.2 and 1.9.2 as well.

    ReplyDelete
  17. Thank you so much for all the effort on that area. Netbeans was the best Ruby/Rails IDE so far

    ReplyDelete
  18. Quick question do RSpec tests run in netbeans 7.1.1? I'm getting the error 'spec' executable not found.

    Thanks for all your great work!

    ReplyDelete
  19. I am trying to create Rails project on Windows for the first time. Using NetBeans 7.1.1 on Windows 7. Now when I created the first Rails project, it is downloading all the modules. Now it is stuck at 25% for more than 10 minutes or so and the console says "Installing json (1.6.5)". Any thought?

    ReplyDelete
  20. I've finally moved on from 6.9.1 as it didn't seem to work with the latest Ubuntu. I'm really pleased with how the new version (7.1.2) works with Ruby (once you've added your patches). Splendid stuff.

    With one exception. Test files are not appearing in the test folder in Project view. They are visible in Files view but not Project view.

    Also, a more minor irritant is that right clicking the project root in project view is very hit and miss. Occasionally I get a menu, but usually not.

    ReplyDelete
  21. Thomas,

    I can't tell you how much I appreciate your work to keep Netbeans supporting Rails. I've tried Aptana Studio 3, but after two months of trying, I gave up (mostly because I have never found an Eclipse tool that wasn't flaky).

    I love Netbeans for my PHP work and it's fantastic to have Rails support - particularly given that my job now depends on my being able to do Rails.

    Thanks again and, if we're ever together in a pub at the same time, the beers are on me!!

    Stephen Westman

    ReplyDelete
  22. Thanks.

    But, I can't apply this with NetBeans 7.2 Nightly Build.
    http://bits.netbeans.org/netbeans/trunk/nightly/latest/

    How can I it ?

    ReplyDelete
  23. Are there any updates on it, any release, even only source code?

    Even now Netbeans with Ruby plugin is the best Ruby/Rails IDE, so it would be great to see someone working on this.

    ReplyDelete
  24. Love the Ruby plugin, thanks for the work. I'm also wondering if there's any work being done for Netbeans 7.2

    ReplyDelete
  25. You can see the build status here: deadlock.netbeans.org/hudson/job/nbms-and-javadoc/

    ReplyDelete
  26. Thanks a lot.
    Iam trying to get the debugger working with your patch on Netbeans 7.1+Ruby 1.9.3p125 + Rail 3.2.x ( ON MAC OSX LION) but keep having issues.
    Everything else works fine (except the debugger).

    Would appreciate any tips/worksarounds .

    ReplyDelete
  27. Hello, a great work!
    But I have some question, will be autocomplete code works with this modules?
    Thanks.

    ReplyDelete
  28. Hello, a great work!
    But I have some question, will be autocomplete code works with this modules?
    Thanks.

    ReplyDelete
  29. Now that Netbeans 7.2 is out, I don't see Ruby on Rails in the list of plugins. Is there still a workaround out there? Anyone have any suggestions?

    ReplyDelete
  30. Y get two errors when I try to install the plugins in Netbeans 7.2:

    The plugin HTML Editor Library is requested in version >= 2.0.1 (release version 2) but only 3.6.1 (of release version different from 2) was found.

    The plugin HTML Editor is requested in version >= 1.6 (release version 1) but only 2.4.1 (of release version different from 1) was found.

    Someone knows a way to avoid the errors?

    ReplyDelete
  31. Unfortunately, this workaround doesn't work for Netbeans 7.1.2

    I'm getting an exception when I press left button on existing RoR project: NullPointerException at org.netbeans.modules.ruby.railsprojects.RailsProjectUtil.getRailsVersion

    ReplyDelete
  32. oh well, jEdit then... (eliminated the following: emacs w/ dired-tree, gave up on emacs for the 12th time, vim with various file explorer plugins in various degrees of brokeness, eclipse never liked eclipse, textwrangler it just is hard to read ugly was surprised how ugly it looked compared to jEdit 5 beta )...

    jEdit wins and is cross-platform--Main editor. netbeans still for java and PHP and other things perhaps.

    ReplyDelete
  33. Hi, thanks for great work. May I know, is there a way to use it with netbeans 7.2? Cheers.

    ReplyDelete
  34. Here's a link to load it in Netbeans 7.2:

    https://blogs.oracle.com/geertjan/entry/ruby_in_netbeans_ide_7

    I just added a new plugin source, included the plugin, and voila!

    I haven't tested it much but so far, so good.

    ReplyDelete
    Replies
    1. What is the name of the plugin, cose I cant see it on the list...

      Delete
  35. I love the plugin, I've used it extensively on Windows. Now I am running Rails 3 on a MacBook Pro and when I try to run my project I get:
    /usr/bin/ruby: No such file or directory -- script/server (LoadError)

    Apparently it is trying to run script/server instead of rails server

    Is there a workaround this?

    ReplyDelete
  36. Hi, I'm getting an error, 'invalid platform' when I'm trying to create a new project. Does anyone know why is that?

    ReplyDelete
  37. 1 year 4 months later and this still saves one's time. aweseme work!

    ReplyDelete