3.4.23 breaks when using non-default Rails logger
See original GitHub issueAfter 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:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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.