Hi
I’m very keen to learn RoR and have been following the Agile Web
Development with Rails book (first edition). However, I’ve come
across a problem which has had me stumped for days now.
After following the instructions up to page 85 I have tried testing
the code thus far, as suggested, by adding an item to the cart. But I
am getting the following error:
–
NoMethodError in StoreController#add_to_cart
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.<<
I’ve been testing in Firefox to ensure that the cookie is being
created (it appears to be OK). Does anyone know what I’m missing/
doing wrong? Also, this may or may not help… if I try to start the
lighttpd server I get nothing working and have to resort to using
Webrick. So it may be a installation fault and not a coding error.
Thanks in advance,
Steve