RVM and Textmate

Since RVM works its magic by manipulating your shell's environment, Textmate can't know what version of ruby you've activated in RVM. This is, frankly, a pain. Fortunately there's a quick fix in new versions of RVM. 

  1. In Textmate goto: Preferences -> Advanced -> Shell Variables
    • Add a variable named TM_RUBY
    • Set the value of TM_RUBY to: /Users/your_username/.rvm/bin/textmate_ruby
      Screen_shot_2010-01-22_at_3
  2. From a terminal run: rvm ruby-version --symlink textmate
    • for JRuby => rvm jruby --symlink textmate
    • for Ruby 1.8.7 => rvm 1.8.7 --symlink textmate
    • etc...
  3. Run the previous command whenever you want to change the ruby that Textmate uses!