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

Hi,

I have read (http://blog.antarestrader.com/?p=16) 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
(http://dev.rubyonrails.org/ticket/10535).

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


Logger support

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

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

Thanks,

Philippe L.

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

ActiveRecord::Base.logger = Logger.new("/dev/null")

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

Thanks,

Philippe L.


Appreciated my help?
Reccommend me on Working With Rails
http://workingwithrails.com/person/11030-ryan-bigg

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