Many of TextMate’s commands use
ruby and there also is a Ruby → Run command to run your current ruby script (⌘R).
All these commands work out-of-the-box on a standard Tiger/Leopard/Snow Leopard install, but there are ways to break some or all of them:
Overwriting or removing
rubygemsbut not having that installed for all your versions of
TM_RUBYto a bogus value.
PATHto a bogus value.
Installing a version of
rubywhich is not compatible with TextMate’s ruby extensions (64 bit builds of
rubyon Snow Leopard)
Never ever do #1. This is bad! Really bad! Please just don’t do it!
Assuming you did not delete
/usr/bin/ruby the proper way to get TextMate to use your custom installed ruby is either updating
PATH so that the directory with your new ruby is listed before
/usr/bin or alternatively to set
TM_RUBY to the version of ruby you wish to use (e.g.
Be aware though that the latter will not affect all TextMate commands, it will however affect the version of ruby used to validate your script (⌃⇧V) and to run it (⌘R). There should be no real reason wanting the other commands to use your new ruby.