Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `-' for nil:NilClass #79

Closed
stereodenis opened this issue Jun 12, 2015 · 3 comments
Closed

undefined method `-' for nil:NilClass #79

stereodenis opened this issue Jun 12, 2015 · 3 comments

Comments

@stereodenis
Copy link

bundle exec haml-lint app/views
undefined method `-' for nil:NilClass
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/linter/space_before_script.rb:29:in `visit_tag'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/haml_visitor.rb:18:in `visit'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/haml_visitor.rb:27:in `block in visit_children'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/haml_visitor.rb:27:in `each'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/haml_visitor.rb:27:in `visit_children'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/haml_visitor.rb:23:in `visit'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/linter.rb:17:in `run'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/runner.rb:63:in `block in find_lints'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/runner.rb:62:in `each'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/runner.rb:62:in `find_lints'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/runner.rb:22:in `block in run'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/runner.rb:21:in `each'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/runner.rb:21:in `run'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/cli.rb:73:in `scan_for_lints'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/cli.rb:47:in `act_on_options'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/lib/haml_lint/cli.rb:22:in `run'
/Users/stereodenis/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/haml-lint-0.13.0/bin/haml-lint:7:in `<top (required)>'
/Users/stereodenis/.rbenv/versions/2.2.0/bin/haml-lint:23:in `load'
/Users/stereodenis/.rbenv/versions/2.2.0/bin/haml-lint:23:in `<main>'
@sds
Copy link
Owner

sds commented Jun 12, 2015

Hey @stereodenis,

It would be really helpful if you included the HAML file that caused this failure. You should be able to narrow it down without too much effort. Thanks!

@stereodenis
Copy link
Author

@sds

%p= t('.greeting', :recipient => @resource.email, :default => "Welcome #{@resource.email}!")
%p= t('.instruction', :default => 'You can confirm your account email through the link below:')
%p= link_to t('.action', :default => 'Confirm my account'),                         |
    confirmation_url(@resource, :confirmation_token => @token, locale: I18n.locale) |

removing multiline '|' fixes issue

@stereodenis
Copy link
Author

@sds oh!
it cause I have multiline with %p=
sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants