I’m using the Eclipse plug-in named RadRails to work on Rails projects. I’m running on Mac OS X, and I finally got past this error that would come up every time I tried to generate a Model, Controller, or anything for that matter:
No such file to load -- rubygems (LoadError)
Strange thing is, generating models, controllers, and such worked just fine from my bash shell, but not from within Eclipse. I thought it was something to do with my system PATH variable, but that was not the case.
The way to fix this error is to add ruby to your list of interpreters in:
Window => Preferences => Ruby => Installed Interpreters
Add an interpreter, name it Ruby, and give it the path to your ruby binary file. To find where that is located, just type
which ruby from your shell prompt.
I hope this helps someone else. It took me a long time to find a solution for this.