Regarding my post yesterday about Netbean’s new 6.7 rc releases …
While my initial user experience was dandy, I have since discovered some show stopping bugs.
– When trying to import your plugins from a previous version (6.5 in my case), the screen that pop up mysteriously disables mouse clicks.
So you basically get stuck at a screen like this one …
… with no possible way of moving forward or back.
I had to kill the netbeans process and restart (happened in both rc2 and rc3).
To be fair, after restarting, I had no more problems … the plugins seemed to have imported just fine.
– I also discovered another odd problem while trying to work on migration files in Rails. After Netbeans produced one intellisense dropdown, the entire IDE would start freezing on every 2 or three key strokes … making itself unusable. I had this problem in rc2, no such problem with rc3.
– On the plus side, startup time is *a lot* faster than in 6.5. As soon as I loaded a few modules the startup speed went back to be cell-phone-customer-service slow, so no plus there.
+ The whole netbeans process seems to be self contained now. It used to be that when you looked in process explorer, you’d see Netbeans, nbexec and java, with the real size of netbeans contained in the Java process.
This, happily, is no longer the case. Netbeans still easily tops 200MB of memory though :\
– Trying to create a new rails app, the browse button on this screen does not work, terrible eh?
PS: This worked for Netbeans 6.7 RC2, however it will HORRIBLY break any attempt to use irb from the windows command line
If you right click on a project in Netbeans then go to ‘Ruby Shell (IRB)’, you should get dropped into a ruby IRB window.
Unfortunately for most of you on windows, you might get this instead …
An easy fix is to go to irb.bat and comment out the first 7 lines of code so that it looks like this
#@if not "%~d0" == "~d0" goto WinNT
#\bin\ruby -x "/bin/irb.bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
#"%~dp0ruby" -x "%~f0" %*
# irb.rb - intaractive ruby
# $Release Version: 0.9.5 $
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(email@example.com)
if __FILE__ == $0
# check -e option
if /^-e$/ =~ $0
So the rails way of requiring a gem in your app is by using the config.gem instruction in environment.rb (as opposed to sticking a require statement in your environment.rb).
However including gems from github is a different beast … sometimes the gem author will tell you exactly how to do it, or sometimes they won’t, as the case with flickr-fu.
Just fyi … typically when you are including a gem from git hub you will want to do something like this …
config.gem 'gem-name-from-'gem -list'-command', :lib => 'github_gem_name', :source => 'http://gems.github.com'
“gem name from gem -list command” … by this I mean that you should run a gem -list command from your command line and use the name that shows up for your gem there.
… so the will_paginate gem config.gem statement looks like this …
config.gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
but for the xml-magic gem, its this ….
config.gem 'xml-magic', :lib => 'xml_magic', :source => 'http://gems.github.com'
and for the flickr-fu gem, its this ….
config.gem 'flickr-fu', :lib => 'flickr_fu', :source => 'http://gems.github.com'
Its not documented anywhere.
I had to figure it out by trial-and error, now you don’t have to 😀