4-hzwq
Last Updated: February 25, 2016
·
4.679K
· franklouwers
Deb129b8830b3ebc0ede3ac2fb0eda7f

Make rvm and Sublime Text 2 play nice

If you use Sublime Text 2 (and you should!) and you use rvm (and you should, unless you use rbenv), you've noticed that they don't play nice with each other by default.

If you want to use the ST2 "Build" system (cmd-B) with rvm, please replace ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Ruby/Ruby.sublime-build (or the corresponding file in your Linux or Windows install) with this:

{
  "cmd": [ "/Users/frank/.rvm/bin/rvm-auto-ruby", "$file" ],
  "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
  "selector": "source.ruby"
}

Note: change the /Users/frank to your homedir. For some reason (my version of) Sublime Text 2 won't pass $HOME and won't work with ~ either. Must debug that ...

Say Thanks
Respond

5 Responses
Add your response

43
E0a232c9e748f729d965a989be2d12c6

Thanks for the tip. Do you perhaps know how to make ruby-test work with RVM? I get error messages like: Could not find activesupport-3.2.3 in any of the sources (Bundler::GemNotFound). This is because ruby-test runs from a different location and because of rvm, the gem is not available outside the project folder. Any ideas?

over 1 year ago ·
4191

Hallelujah! Finally got this working! Thanks!

over 1 year ago ·
5548
4c4ab0fedd8fb91a31797c10e68dac55

It's work ! :) thx :)

over 1 year ago ·
10960
4ee8e20a519f3afdcd03bcf24681dbd8

thanks!

over 1 year ago ·
15324
Snbwkazi normal

You can also just run "which rvm-auto-ruby" and it will return the full path to the file. RVM doesn't always install to the home directory!

over 1 year ago ·