Textmate pulling wrong gems in leopard

when trying to run a ruby test in textmate i get the following:

Missing the Rails 2.0.2 gem. Please gem install -v=2.0.2 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.

it is using the version of ruby that comes packaged with leopard not
the one that i compiled in /usr/local

anyone know how to change that?

You can your PATH variable to have /usr/local/bin come first. I don’t
have Leopard so I can’t check the defaults, but if the system (/bin)
directories (or wherever they put are not listed in your home folder
bash profile (~/.bash_profile), then check the root-level (/etc/
profile) configuration, and insert it there. Since it’s at the root
level, you can only change it like this:

sudo vim /etc/profile (entering your admin password thereafter)

/etc/profile is loaded before any user profiles, and it affects the
PATH environment variable of ALL users of your Mac. (It won’t hurt
anyone who doesn’t use anything in /usr/local/bin, it just ensures
that binaries there have precedence.)

The version of ruby isn’t the only thing, though. The error shown
below is telling you that the rails gem being asked for in
environment.rb is not the same one it sees. I’m not sure if changing
the path (to see the version of ruby you want) will affect where it
looks for gems, but it might. Try it and see.

Errrr: You can change your PATH variable…

On 8 Apr 2008, at 14:52, Josh wrote:

Have you tried setting the TM_RUBY environment variable to point at
your ruby binary (in the advanced bit of textmate’s prefs) ?

Fred

changing TM_RUBY lets my run my tests.

my PATH had /usr/local/bin first, and when in the commend line, rails -
v outputs 2.0.2

for some reason though, the generators still do not do anything other
than tell me that the action has been completed. no errors. nothing.