NB 6.5, OS/X, Rails Gem Version error

I am getting the following error message when I attempt to start

Missing the Rails 2.1.1 gem. Please gem install -v=2.1.1 rails,
update your RAILS_GEM_VERSION setting in config/environment.rb for the
Rails version you do have installed, or comment out RAILS_GEM_VERSION
to use the latest version installed.

I tried commenting out the RAILS_GEM_VERSION and it doesn’t do
anything at all. The problem is that I can start the application via
the command line just fine. I am not using jRuby, but instead compiled
and installed my own version of Ruby, Gem, and Rails into /usr/local/
and am using that pathing for all the tools (at least on commandline -
I don’t know if Netbeans is ignoring the PATH).

On my Linux box the same source tree works fine and runs WEBRick. I
saw the following message in this google group, BUT where is ruby2/
rake_tasks_info.rb I only have an executable file on the Mac:

Do as the error tells you to
You need to install a specific version of rails…version 2.1.1

This is done by:
gem install -v=2.1.1 rails