rurounijones / yarder

JSON based replacement logging system for Ruby on Rails
MIT License
12 stars 8 forks source link

entry is nil inside rake tasks or rails console #11

Closed ochko closed 10 years ago

ochko commented 10 years ago

I see error logs

Could not log "sql.active_record" event. NoMethodError: undefined method `fields' for nil:NilClass

when it is in rails console or in rake task.

rurounijones commented 10 years ago

Thanks for the contribution, merged into master.

I am afraid I no longer work with rails and am not in a position to test this live. Can you confirm that this has been tested in a live (i.e. running; not necessarily production) app? (+ rake / console / background task ).

If so then I will make a 0.0.2 release.

ochko commented 10 years ago

Sure. It is working fine in my production env.

rurounijones commented 10 years ago

Groovy, thanks for the information.

I will release a 0.0.2 gem with this fix in it then since I know some others have run into the problem. Also because I do not have time to really do anything with this (and am not using it) I will give you commit access.

Thanks again.