4

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!

Community
  • 1
  • 1
arthur
  • 348
  • 4
  • 16

1 Answers1

8

Here's what I did:

  1. select "Sublime Text" > "Preferences" > "Browse Packages ..."

    (this opens ~/Library/Application Support/Sublime Text 3/Packages)

  2. open the User directory (create it if it doesn't exist)

  3. inside User create a file Ruby.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
Stefan
  • 109,145
  • 14
  • 143
  • 218
  • 1
    Some possible helpful info about "/your/path/to/bin/ruby". In my case it's "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby" – arthur Apr 11 '14 at 15:26
  • @Art that is the default version, isn't it? – Stefan Apr 11 '14 at 15:41
  • 1
    Stefan, good point. I'm not sure what initial version was default in my OS. However features from necessary version are available for me in Sublime after your advice. Let me know if my previous comment might be improved for other people. Appreciate your attention and patience (: – arthur Apr 12 '14 at 06:34