I've just installed https://github.com/SublimeLinter/SublimeLinter
and was wondering : it possible by default to switch checking ruby ?
they write that Ruby - syntax checking via ruby -wc but how it's to be called?
And are there any rails specific addons? didn't find other...
1 Answer
I'm not quite sure what you're asking ... but if you're looking to change SublimeLinter so that it runs something other than ruby -wc, then you can edit line 10 in the file ~/Library/Application Support/Sublime Text 2/Packages/SublimeLinter/sublimelinter/modules/ruby.py.
For example, you can take these steps to have SublimeLinter use your gemset's ruby:
- Hold the option key down
- Click the
Gomenu in Finder - Select
Library - Navigate into
Application Support/Sublime Text 2/Packages/SublimeLinter/sublimelinter/modules - Open the file
ruby.pyin Sublime Text 2 - Change line 10 from
'executable': 'ruby',to'executable': '/Users/YOUR-USER-NAME/.rvm/bin/rvm-auto-ruby', - Restart Sublime Text 2
Update:
I just found out an easier way to accomplish this...
You can change the SublimeLinter settings to have SublimeLinter use your gemset's ruby by opening the Sublime Text 2 menu, going into Preferences -> Package Settings -> SublimeLinter, and selecting Settings - User. Add this text to the file, save it, and restart Sublime Text 2:
{
"sublimelinter_executable_map":
{
"ruby": "rvm-auto-ruby"
}
}