I figured out this. In order to configure rbenv in ST2 you need to go to Browse Packages, then select the Ruby package, and edit the file Ruby.sublime-build
changing the cmd
property, like this:
{
"cmd": ["/path/to/your/ruby/shim", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.ruby"
}
In my case, since I'm using boxen, the path was /opt/boxen/rbenv/shims/ruby
, but in a standard rbenv installation it should be something like /home/username/.rbenv/shims/ruby
in Linux or /Users/username/.rbenv/shims/ruby
in OS X.