Use default ruby version in Sublime Text 2

2019-01-26 16:21发布

问题:

My default and current version of ruby is 1.9.3. It's actually the only version that appears when I run rvm list so I don't see how I can be messing that part up. I did follow this tutorial that I found here, but it just seemed to break everything. I keep getting "No such file or directory" for all the variations of the fix I see, even the in the comments. I am on a Mac, please let me know what other information I need to post here to help you figure out how I'm breaking things.

回答1:

You can always edit which ruby is used by editing your Build command preferences:

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

Change the default "ruby" to whatever path you require. The version you're using at any given time can be discovered with:

which ruby

Alternatively you can just link to the default which is often located at /opt/local/rvm/bin/ruby.