Closed goranovs closed 5 years ago
Same here, this appears everytime I hit save on a *.haml
file.
But when in terminal:
» ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
I had to disable temporary.
@unmultimedio it sounds like your Atom environment is different from your shell, you may need to manually specify the path to haml-lint
.
@Zaifor interesting, looks like putting a try
/catch
block around here and translating that into a linter message (somewhat like what was done here) is probably the right way to go.
If you want to put up a PR implementing that I'd be happy to review it, as I don't use this linter myself though it will be a while before I can get to it. Unless you want to tackle it @jschroeder9000?
Similar issue for myself.
Is there a suggested fix other than disabling?
@lukecartledge The fix is to read the warning, then update your Ruby install like it's telling you to do 😛.
@Arcanemagus Unfortunately, this is part of a project with a specified (2.2.3) Ruby version. I had already tried installing that version as was suggested in the warning.
I resolved this by altering the binstub generated by Bundler (see bundle binstubs
) for haml-lint to run Ruby with a -W0
argument to suppress warnings:
#!/usr/bin/env ruby -W0
#
# This file was generated by Bundler.
#
# The application 'haml-lint' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'rubygems'
require 'bundler/setup'
load Gem.bin_path('haml_lint', 'haml-lint')
Then I pointed linter-haml at this binstub rather than at the haml-lint binary.
@sentience that did it for me. but we do need a better solution. if i have time this weekend i'll probably dive into the code and fix.
For some reason linter-haml is not working when this warning is there. It is a warning not an error.
haml-lint
its working in iTerm (same warning there).