Closed gabrielecirulli closed 10 years ago
Are you using ruby <= 2.0? I'm on 2.1.0-p0 and I'm getting the same issue, even though ruby treats all source files as UTF8 by default these days.
Adding the old-school # encoding: utf-8
line to the top of the file resolves the error, although I don't understand why. The oldest version of ruby on my machine is 2.0.0p247, so I shouldn't be seeing source-encoding issues like this.
I'm on Ruby 2.1.0 too :smile:. Is adding that comment at the top the only way to avoid this?
I'm looking for someone to take responsibility for this linter. I don't use it, so I won't be supporting it.
I'm on ruby 2.1.2 and having the same issue. ruby -wc filename.rb
is OK but sublimelinter complains about utf8 characters.
# encoding: utf-8
is a fix but an ugly one.
I have a fix in the pipeline which took many hours to track down.
I can only assume you guys get paid for what you are doing with ruby and that SublimeLinter is a valuable tool. I don't use ruby and I took time from my paying clients (time I really don't have) to fix this for you. I would greatly appreciate it if you would place some value on your time and my time by donating.
Fixed in 3.4.0.
Donations — or even better, collaborators — are welcome. Otherwise the future it's doubtful I'll do anything to support ruby.
I have the following ruby code:
SublimeLinter-ruby complains about line 9:
This line contains an unicode character, an em dash ("—"), and SublimeLinter-ruby reports it as an error with the following message:
I think this is a problem with SublimeLinter-ruby (or maybe SublimeLinter in general). If I run the same code through
ruby -wc app/helpers/application_helper.rb
I getSyntax OK
, and if I remove that unicode character and replace it with an ASCII character, SublimeLinter starts complaining.Is there a way to work around this, or is it a bug that needs fixing? Thanks!