Philippe Lang
2008-May-19 08:25 UTC
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 Lang
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Ryan Bigg (Radar)
2008-May-20 05:02 UTC
Re: Active Record 2.0.2 without logger support? [undefined method `debug'' for nil:NilClass]
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 Lang
<philippe.lang-MLEDU+18noL4B7ddeI/ffg@public.gmane.org>
wrote:
>
> 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 Lang
>
> >
>
--
Appreciated my help?
Reccommend me on Working With Rails
http://workingwithrails.com/person/11030-ryan-bigg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---