Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have multiple versions of Ruby installed on my machine. By using RVM, I am able to use Ruby 1.9.2 on the terminal. But whenever, I use Sublime Text, the text editor of my choice, it defaults to using Ruby 1.8.7. How do i change this behavior?

share|improve this question
you need to make sure that your ruby install is the first one found in the path, otherwise it won't be picked up. Or you can specify the absolute path to the installation you want (e.g. /usr/local/bin/ruby for homebrew). – XQYZ Jun 8 '12 at 14:09

This worked for me.

Update ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Ruby/Ruby.sublime-build

  "cmd": ["rvm-auto-ruby", "$file"],
  "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
  "selector": "source.ruby"

The env part will add rvm-auto-ruby into the $PATH and the cmd will execute rvm-auto-ruby yourfile.rb when you press Cmd-B. You and add options in between rvm-auto-ruby if you want, like this `”cmd”: [“rvm-auto-ruby”, “-S”, “$file”].

From here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.