# Need help trying to debug - included screenshot

**URL:** <https://www.ruby-forum.com/t/need-help-trying-to-debug-included-screenshot/112814>\
**Category:** Rails\
**Created:** [August 23, 2007, 3:53pm UTC](https://www.ruby-forum.com/t/need-help-trying-to-debug-included-screenshot/112814 "2007-08-23T15:53:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bradkenyon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@bradkenyon](https://www.ruby-forum.com/u/bradkenyon)\
**Post date:** [August 23, 2007, 3:53pm UTC](https://www.ruby-forum.com/t/need-help-trying-to-debug-included-screenshot/112814/1 "2007-08-23T15:53:17Z")

</div>

I have attached a screen shot of the error I am running into.

I am on page 138 of the Agile Web D. with Rails book by  
Pragmatic Programmers.

I am developing the depot store, and I ran into an error, with  
hidden\_div\_if.

When I remove that block of code, things to work fine, besides the fact  
the cart does not display on the site, but everything else functions  
correctly, so it is something with that line 20 of code.

\<% hidden\_div\_if(@cart.items.empty?, :id =\> “cart”) do %\>

Look at the screen shot, any help is much appreciated.

Thanks,  
Brad

---

<div class="post-metadata">

**Author:** ![bradkenyon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@bradkenyon](https://www.ruby-forum.com/u/bradkenyon)\
**Post date:** [August 23, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/need-help-trying-to-debug-included-screenshot/112814/2 "2007-08-23T16:10:46Z")

</div>

2007/8/23, Brad K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> \<% hidden\_div\_if(@cart.items.empty?, :id =\> “cart”) do %\>
> 
> Look at the screen shot, any help is much appreciated.

It seems to me that you forgot to add “@cart = find\_cart” in the action.

---

<div class="post-metadata">

**Author:** ![bradkenyon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@bradkenyon](https://www.ruby-forum.com/u/bradkenyon)\
**Post date:** [August 23, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/need-help-trying-to-debug-included-screenshot/112814/3 "2007-08-23T16:12:49Z")

</div>

Thomas W. wrote:

> 2007/8/23, Brad K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > \<% hidden\_div\_if(@cart.items.empty?, :id =\> “cart”) do %\>
> > 
> > Look at the screen shot, any help is much appreciated.
> 
> It seems to me that you forgot to add “@cart = find\_cart” in the action.

thanks, i’ll try that tonight and reply whether or not that was the  
problem.

thanks again!
