1

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 1

3

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 Go menu in Finder
  • Select Library
  • Navigate into Application Support/Sublime Text 2/Packages/SublimeLinter/sublimelinter/modules
  • Open the file ruby.py in 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"
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.