It looks like Sublime Text 3 uses OSX-default version of Ruby in build mode. I would like to change the version, since I’m using a newer one. I found some answers for privious version of sublime:
How to edit a native build system in Sublime Text 2?
Setting and changing build systems in Sublime Text 2
Ruby, Sublime Text 2 and RVM help please!
All of them are dealing with Ruby.sublime-build file (given that I have RVM installed), but I can’t this file in Sublime Text 3. May be I should change /Users/Art/Library/Application Support/Sublime Text 3/Packages/User/Ruby.sublime-settings? But any manipulations with it didn’t give me a result.
Any help would be really appreciated!
Answer:
Here’s what I did:
- select “Sublime Text” > “Preferences” > “Browse Packages …”
(this opens
~/Library/Application Support/Sublime Text 3/Packages
) - open the
User
directory (create it if it doesn’t exist) - inside
User
create a fileRuby.sublime-build
with the following content (adjust the path):{ "cmd": ["/your/path/to/bin/ruby", "$file"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.ruby" }
Your directory structure should look like this:
~/
Library/
Application Support/
Sublime Text 3/
Packages/
User/
Ruby.sublime-build