Ruby on Rails Saturday, August 2, 2014

On 2 August 2014 13:20, Jaimin Pandya <lists@ruby-forum.com> wrote:
>> Simple debugging can be performed using Logger.info, which inserts
>> into the log file (eg log/development.log), so you can confirm this by
>> inserting, before the problem line
>> Logger.info( "expensescounter is: #{@line_item.expensescounter}"
>
> I used logger.info for debugging and it insert in development.log file
> that @line_item.expensescounter is nil.
>
>> If it is nil, if you cannot see the problem, you can put additional
>> logs in to home in on the problem.
>> Also in the log file you will find useful information showing the
>> parameters being passed into the action.
>
> I have attached development.log file(productionlog.odt) in my question.
>
> How could i solve this error?

By working out why it is nil. It is called debugging. Have a look
where you setup that value and if necessary put more logging in till
you see where the problem is.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtGz_dE-efwSSxLfJssZWgWUPSK-skGtshWe_oeCbPWuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment