If you're using SublimeLinter with Sublime Text 2 on Rails projects using RVM, then you might have noticed some lines are displayed as being errors when they're actually not.
This is because SublimeLinter is using the system ruby, instead of the ruby for your gemset. See, the Ruby linter that SublimeLinter uses is extremely simple. It just runs the code through
ruby -wc and marks any output in the code. But that's the problem. Sublime Text 2 isn't using the
ruby that your Rails app uses.
You can change the SublimeLinter settings to correct this issue 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:
The old way we had to fix this problem was to go through the package files themselves:
Gomenu in Finder
Application Support/Sublime Text 2/Packages/SublimeLinter/sublimelinter/modules
ruby.pyin Sublime Text 2
The drawback to this workaround was that if/when SublimeLinter was updated, you would lose this edit. Good thing we don't need to worry about that, anymore!
16 Oct 2009 Holyoke's Center City Vision Plan
19 Jan 2012 How Multi-File Search in BBEdit improved my workflow
09 Dec 2012 The tech behind getting Blizzalert into its third season
30 Mar 2012 I put together the site for JeffreyB Photography
20 Jan 2012 Using a custom version of Git on Mac OS X Lion