Active Record 2.0.2 without logger support? [undefined method `debug' for nil:NilClass]


I have read ( and noticed, when
upgrading to Active Record 2.0.2, that not using a logger can cause
NilClass errors, more specifically the error “undefined method `debug’
for nil:NilClass”.

There is an opened ticket for about 5 months about this

I’m unsure if this is a bug, or if we do all have to include

Logger support

require ‘logger’
ActiveRecord::Base.logger =“debug.log”)

… in our source code. For me, this works. No more NilClass error with
Logger support. But I wish I could disactivate it.


Philippe L.

If you’re using linux you may even be able to pipe that data into
therefore not creating a file at all:

ActiveRecord::Base.logger ="/dev/null")

On Mon, May 19, 2008 at 5:55 PM, Philippe L.
[email protected]


Philippe L.

Appreciated my help?
Reccommend me on Working With Rails

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs