Closed foxnewsnetwork closed 12 years ago
What the error says to me is that there is no products yet.
The error is that like the offset is some really bizarre number, if you try to get the offset, for the random call, it'll turn out bad. I've been running everything locally so i've had no problem, but i remember when i didn't have anything in my db, the problem looked like this.
If we fill with some basic products/coupons/whatevs hopefully the problme will be fixed.
I've updated the code on gameritser.com 's backend. database should have some products now. I will try to add some more into the seed.rb when I have time.
oh and make sure you use the right token.
'12345678' is an example token, not the actual one. If you want one fast, use
cf242dcaf5d0a4a0b0e2949e804dcebf
I just generated it. It's 'Food Fighter's token.
Okay, doing more shop testing. In other news, let's generate an all-purpose game token for future developers too lazy to come to our site to sign up for their own tokens. The general purpose game token can also be used by in-house games. Needless to say, we do not profit share with people who use the general game token
Just simulated an api call using the example code in the wiki section. The following code is what I ended up getting returned instead of a nice json file:
status: 500 headers: {"content-type":"text/html","content-length":"30284","x-runtime":"0.133223","connection":"keep-alive","server":"thin 1.3.1 codename Triple Espresso"} body:
ActiveRecord::StatementInvalid in ProductsController#random_api
Rails.root: /root/backend/American-Lit-315
Request
Parameters:
Show session dump
Show env dump
Response
Headers: