kc0xag
Last Updated: February 25, 2016
·
3.919K
· al3xnull
Acbd4354f676223d4ec851fe73114d0d

Ruby 1.9 Syntax Linting with Sublime Text 2

Recently, I've been diving more into Ruby 1.9 hash syntax and SublimeLinter was driving me nuts. Just all kinds of "errors" which were preventing me from seeing something that was actually wrong as well as not being able to really read my code.

I found quite a few solutions, but changing the ruby executable map in User Preferences didn't really do anything for me. Instead, I chose the following for getting it to work with RVM.

One - mileage may vary on location:

subl ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/SublimeLinter/sublimelinter/modules/ruby.py

Two - Change the executable location to the rvm-auto-ruby:

'executable': '~/.rvm/bin/rvm-auto-ruby',

Once this has been done, restart Sublime and you should be on your way.

Say Thanks
Respond

3 Responses
Add your response

3242
Acbd4354f676223d4ec851fe73114d0d

Side note: This is a very crude method to implement this -- Just a couple weeks ago, my configuration file reverted back (I'm assuming to an update or the like).

over 1 year ago ·
4875
32ca24efe7e31ca8fd90261fb4a7acd8

greate tut. but how to do this in ubuntu 12.10. My ruby systax gone when i removed ruby and eventhought i reinstall ruby yesterday

over 1 year ago ·
10775
6b4b7f11163b1e87571995ce8c3f0bce

I believe the best way would be, to change it the user preferences of the SublimeLinter Package. You can find it under Preferences > Package Settings > SublimeLinter > Seettings - User

There you it can look like this one (example using rbenv):

{
  "sublimelinter_executable_map":
  {
    "ruby": "~/.rbenv/shims/ruby"
  }
}
over 1 year ago ·