Ruby on Rails Friday, April 5, 2013

On 5 April 2013 14:43, Dmitrij B. <lists@ruby-forum.com> wrote:

Please quote the previous message so that it is easier to follow the
thread. Remember this is a mailing list not a forum (though you may
be accessing it via a forum like interface). Thanks.

> its text error: Error:
> test_update_shipping_date(UserStoriesTest):
> ActionView::Template::Error: undefined method `>' for nil:NilClass
> /home/dima/RubyOnRails/Projects/depot/app/views/layouts/application.html.erb:23:in

Look at the error, it says you have tried to call the method '>' for
something that is nil. Now look at the line mentioned:
<% if (session[:counter] > 5) %>
It seems likely that session[:counter] is nil.

Have a look at the Rails Guide on debugging, it will show you
techniques that you can use to debug your code.

By the way, if posting again it is better to just copy the relevant
bits of code and put them inline in the message, unless you really
have to post lots of code, which in this case was not necessary.

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.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment