I am completely new to Ruby and thus I am not quit sure how to
troubleshoot this issue. I have looked at other forums and found nothing
that helps my particular situation.
I am trying to count the number of “Chicken Sandwich” products sold each
week for 8 weeks starting 1/4/2015 - 1/10/2015.
I have successfully run this code when I only attempt one week (so the
same script except lines 23,34,35,36) but as soon as I introduce a while
loop to go over the 8 weeks, or create a different function for each
week I get the same error. It seems that after I use the code in lines
29-33 once I can’t use it again in the same script, even if I change the
array name (item_arrey) and change the parsed JSON data object name
(items_js) across different functions.
For this script, the error occurs in line 29 in ‘fetch_lto_info’:
undefined method ‘’ for nil:NilClass from line 40 in
Any advice would be awesome remember though, I’m a noob. Thanks.