views:

297

answers:

2

I have been using Netbeans 6.5 recently - it complains (on startup, and if I try to run a unit test):

"Rails requires RubyGems >= 1.3.1 (you have 1.0.1). Please gem update --system and try again."

Yet from the command line "gem --version" : 1.3.1

any ideas? why does netbeans not realise I have gems 1.3.1 ?

A: 

Are you sure you are using the right PATH within Netbeans?

Keltia
Not really sure what that means? I never knowingly set one - it just stopped working one day.
Michael Neale
+1  A: 

Netbeans has per project options for which platform you use. It defaults to JRuby which may not have the same gems as your ruby install. Try right clicking on your project and selecting properties then check that the platform listed is the one you want to use. If it isn't listed you will need to select Manage and add it.

srboisvert
Yeah I think its something in there... thanks for the tip.
Michael Neale
Happily though, netbeans still works well as an editor etc - testament to its good design. I can run everything rails related from the command line (there is something pure and white about command line).
Michael Neale
You just need to set it up to use the right Ruby install by selecting manage on the Project Properties dialog. Then you get the generators and debug. You can use whatever you want with it. It only defaults to JRuby. I use one of several different Ruby environments depending on the project.
srboisvert