question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3.4.23 breaks when using non-default Rails logger

See original GitHub issue

After upgrading to from sass 3.4.22 to 3.4.23 today, we saw it breaking on some new code in the gem:

NoMethodError: undefined method `log_level' for #<Log4r::Logger:0x007f40eb13a5a0>
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.23/lib/sass/logger/delayed.rb:26:in `initialize'
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.23/lib/sass/logger/delayed.rb:17:in `new'
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.23/lib/sass/logger/delayed.rb:17:in `install!'

It seems to assume that the logger supports all the methods that a standard ruby logger supports (such as #log_level), which may be reasonable, but isn’t always the case. In our situation, the sass-rails gem sets Sass.logger to be the default rails logger, which ends up being an instance of Log4r:Logger.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
shayneoAtNorwoodcommented, Jan 31, 2017

Note for people still having this issue

gem ‘sass’, ‘3.4.22’

Will fix it until the sass (or sass-rails I suppose?) people fix it. If its sass-rails at fault, the issue is independent of version of sass-rails.

0reactions
nex3commented, Apr 11, 2019

@msumit It looks like you’re still using Ruby Sass. Ruby Sass has reached end of life, and is no longer supported. Please switch to another implementation as soon as possible to ensure that you’ll remain up-to-date with the latest features and CSS support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging Rails Applications - Ruby on Rails Guides
Rails makes use of the ActiveSupport::Logger class to write log information. ... To enter the debugging session, you can use binding.break and its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found