foxnewsnetwork/American-Lit-315 — Issue #46: Get the example code in the wiki working via api calls
Author: foxnewsnetwork
Created: 2012-02-20 00:38:19+00:00
State: open

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:

Action Controller: Exception caught

ActiveRecord::StatementInvalid
in ProductsController#random_api

Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0.18505674948030526' at line 1: SELECT `products`.* FROM `products` LIMIT 1 OFFSET 0.18505674948030526

Rails.root: /root/backend/American-Lit-315

Application Trace |
Framework Trace |
Full Trace

app/controllers/products_controller.rb:99:in `random_api'

mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `query'
mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `block in execute'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract_adapter.rb:202:in `block in log'
activesupport (3.0.11) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract_adapter.rb:200:in `log'
mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `execute'
mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:586:in `select'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'
activerecord (3.
body: 0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:54:in `block in select_all'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `cache_sql'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:54:in `select_all'
activerecord (3.0.11) lib/active_record/base.rb:473:in `find_by_sql'
activerecord (3.0.11) lib/active_record/relation.rb:64:in `to_a'
activerecord (3.0.11) lib/active_record/relation/finder_methods.rb:343:in `find_first'
activerecord (3.0.11) lib/active_record/relation/finder_methods.rb:122:in `first'
activerecord (3.0.11) lib/active_record/relation/finder_methods.rb:119:in `first'
activerecord (3.0.11) lib/active_record/base.rb:444:in `first'
actionpack (3.0.11) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.0.11) lib/abstract_controller/base.rb:150:in `process_action'
actionpack (3.0.11) lib/action_controller/metal/rendering.rb:11:in `process_action'
actionpack (3.0.11) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.0.11) lib/active_support/callbacks.rb:431:in `_run__338694997__process_action__370775607__callbacks'
activesupport (3.0.11) lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
activesupport (3.0.11) lib/active_support/callbacks.rb:94:in `run_callbacks'
actionpack (3.0.11) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.0.11) lib/action_controller/metal/rescue.rb:17:in `process_action'
actionpack (3.0.11) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.0.11) lib/active_support/notifications.rb:52:in `block in instrument'
activesupport (3.0.11) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (3.0.11) lib/active_support/notifications.rb:52:in `instrument'
actionpack (3.0.11) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.0.11) lib/abstract_controller/base.rb:119:in `process'
actionpack (3.0.11) lib/abstract_controller/rendering.rb:41:in `process'
actionpack (3.0.11) lib/action_controller/metal.rb:138:in `dispatch'
actionpack (3.0.11) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.0.11) lib/action_controller/metal.rb:178:in `block in action'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:62:in `call'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:27:in `call'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:148:in `block in call'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:93:in `block in recognize'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:75:in `optimized_each'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:92:in `recognize'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:139:in `call'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:493:in `call'
warden (1.1.0) lib/warden/manager.rb:35:in `block in call'
warden (1.1.0) lib/warden/manager.rb:34:in `catch'
warden (1.1.0) lib/warden/manager.rb:34:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.5) lib/rack/methodoverride.rb:24:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/flash.rb:182:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/cookies.rb:302:in `call'
activerecord (3.0.11) lib/active_record/query_cache.rb:32:in `block in call'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
activerecord (3.0.11) lib/active_record/query_cache.rb:12:in `cache'
activerecord (3.0.11) lib/active_record/query_cache.rb:31:in `call'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
activesupport (3.0.11) lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
actionpack (3.0.11) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.5) lib/rack/sendfile.rb:106:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.0.11) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.5) lib/rack/runtime.rb:17:in `call'
rack (1.2.5) lib/rack/lock.rb:13:in `block in call'
<internal:prelude>:10:in `synchronize'
rack (1.2.5) lib/rack/lock.rb:13:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.11) lib/rails/application.rb:168:in `call'
railties (3.0.11) lib/rails/application.rb:77:in `method_missing'
thin (1.3.1) lib/thin/connection.rb:80:in `block in pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6:in `<top (required)>'
/opt/bitnami/ruby/bin/thin:19:in `load'
/opt/bitnami/ruby/bin/thin:19:in `<main>'

mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `query'
mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `block in execute'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract_adapter.rb:202:in `block in log'
activesupport (3.0.11) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract_adapter.rb:200:in `log'
mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `execute'
mysql2 (0.2.18) lib/active_record/connection_adapters/mysql2_adapter.rb:586:in `select'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:54:in `block in select_all'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `cache_sql'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:54:in `select_all'
activerecord (3.0.11) lib/active_record/base.rb:473:in `find_by_sql'
activerecord (3.0.11) lib/active_record/relation.rb:64:in `to_a'
activerecord (3.0.11) lib/active_record/relation/finder_methods.rb:343:in `find_first'
activerecord (3.0.11) lib/active_record/relation/finder_methods.rb:122:in `first'
activerecord (3.0.11) lib/active_record/relation/finder_methods.rb:119:in `first'
activerecord (3.0.11) lib/active_record/base.rb:444:in `first'
app/controllers/products_controller.rb:99:in `random_api'
actionpack (3.0.11) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.0.11) lib/abstract_controller/base.rb:150:in `process_action'
actionpack (3.0.11) lib/action_controller/metal/rendering.rb:11:in `process_action'
actionpack (3.0.11) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.0.11) lib/active_support/callbacks.rb:431:in `_run__338694997__process_action__370775607__callbacks'
activesupport (3.0.11) lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
activesupport (3.0.11) lib/active_support/callbacks.rb:94:in `run_callbacks'
actionpack (3.0.11) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.0.11) lib/action_controller/metal/rescue.rb:17:in `process_action'
actionpack (3.0.11) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.0.11) lib/active_support/notifications.rb:52:in `block in instrument'
activesupport (3.0.11) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (3.0.11) lib/active_support/notifications.rb:52:in `instrument'
actionpack (3.0.11) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.0.11) lib/abstract_controller/base.rb:119:in `process'
actionpack (3.0.11) lib/abstract_controller/rendering.rb:41:in `process'
actionpack (3.0.11) lib/action_controller/metal.rb:138:in `dispatch'
actionpack (3.0.11) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.0.11) lib/action_controller/metal.rb:178:in `block in action'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:62:in `call'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:27:in `call'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:148:in `block in call'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:93:in `block in recognize'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:75:in `optimized_each'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:92:in `recognize'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:139:in `call'
actionpack (3.0.11) lib/action_dispatch/routing/route_set.rb:493:in `call'
warden (1.1.0) lib/warden/manager.rb:35:in `block in call'
warden (1.1.0) lib/warden/manager.rb:34:in `catch'
warden (1.1.0) lib/warden/manager.rb:34:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.5) lib/rack/methodoverride.rb:24:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/flash.rb:182:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/cookies.rb:302:in `call'
activerecord (3.0.11) lib/active_record/query_cache.rb:32:in `block in call'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
activerecord (3.0.11) lib/active_record/query_cache.rb:12:in `cache'
activerecord (3.0.11) lib/active_record/query_cache.rb:31:in `call'
activerecord (3.0.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
activesupport (3.0.11) lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
actionpack (3.0.11) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.5) lib/rack/sendfile.rb:106:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.0.11) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.5) lib/rack/runtime.rb:17:in `call'
rack (1.2.5) lib/rack/lock.rb:13:in `block in call'
<internal:prelude>:10:in `synchronize'
rack (1.2.5) lib/rack/lock.rb:13:in `call'
actionpack (3.0.11) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.11) lib/rails/application.rb:168:in `call'
railties (3.0.11) lib/rails/application.rb:77:in `method_missing'
thin (1.3.1) lib/thin/connection.rb:80:in `block in pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6:in `<top (required)>'
/opt/bitnami/ruby/bin/thin:19:in `load'
/opt/bitnami/ruby/bin/thin:19:in `<main>'

Request

Parameters:

{"token"=>"1234567890",
"format"=>"json"}

Show session dump

Show env dump

GATEWAY_INTERFACE: "CGI/1.2"
HTTP_CONNECTION: "keep-alive"
HTTP_HOST: "gamertiser.com"
HTTP_VERSION: "HTTP/1.1"
PATH_INFO: "/api/v1/product.json"
QUERY_STRING: "token=1234567890"
REMOTE_ADDR: "67.170.239.66"
REQUEST_METHOD: "GET"
REQUEST_PATH: "/api/v1/product.json"
REQUEST_URI: "/api/v1/product.json?token=1234567890"
SCRIPT_NAME: ""
SERVER_NAME: "gamertiser.com"
SERVER_PORT: "80"
SERVER_PROTOCOL: "HTTP/1.1"
SERVER_SOFTWARE: "thin 1.3.1 codename Triple Espresso"
action_controller.instance: #<ProductsController:0xb52f110 @action_has_layout=true, @view_context_class=nil, @_headers={"Content-Type"=>"text/html"}, @_status=200, @_response=#<ActionDispatch::Response:0xb52ef94 @writer=#<Proc:0xb52eeb8@/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/http/response.rb:43 (lambda)>, @block=nil, @length=0, @header={}, @status=200, @body=[], @cookie=[], @sending_file=false, @blank=false, @cache_control={}, @etag=nil, @request=#<ActionDispatch::Request:0xb52efd0 @env={"SERVER_SOFTWARE"=>"thin 1.3.1 codename Triple Espresso", "SERVER_NAME"=>"gamertiser.com", "rack.input"=>#<
body: StringIO:0xb3fc1f8>, "rack.version"=>[1, 0], "rack.errors"=>#<IO:/root/backend/American-Lit-315/log/thin.log>, "rack.multithread"=>false, "rack.multiprocess"=>false, "rack.run_once"=>false, "REQUEST_METHOD"=>"GET", "REQUEST_PATH"=>"/api/v1/product.json", "PATH_INFO"=>"/api/v1/product.json", "QUERY_STRING"=>"token=1234567890", "REQUEST_URI"=>"/api/v1/product.json?token=1234567890", "HTTP_VERSION"=>"HTTP/1.1", "HTTP_HOST"=>"gamertiser.com", "HTTP_CONNECTION"=>"keep-alive", "GATEWAY_INTERFACE"=>"CGI/1.2", "SERVER_PORT"=>"80", "SERVER_PROTOCOL"=>"HTTP/1.1", "rack.url_scheme"=>"http", "SCRIPT_NAME"=>"", "REMOTE_ADDR"=>"67.170.239.66", "async.callback"=>#<Method: Thin::Connection#post_process>, "async.close"=>#<EventMachine::DefaultDeferrable:0xb3fbf3c>, "action_dispatch.parameter_filter"=>[:password], "action_dispatch.secret_token"=>"baf4b429612c3139f79d23cf551fc4dc6f9db5f1bf4e9f6fac9052d4a386fd6fcf75b7e593d8e436863ada3ef313147e783ec6ebc64e2b73bfabd06be5e50372", "
body: action_dispatch.show_exceptions"=>true, "action_dispatch.remote_ip"=>67.170.239.66, "rack.session"=>{}, "rack.session.options"=>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :id=>nil}, "action_dispatch.cookies"=>{}, "action_dispatch.request.unsigned_session_cookie"=>{}, "warden"=>Warden::Proxy:94375900 @config={:default_scope=>:publisher, :scope_defaults=>{}, :default_strategies=>{:publisher=>[:rememberable, :database_authenticatable], :company=>[:rememberable, :database_authenticatable], :user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0xa67f9f8>}, "action_dispatch.request.path_parameters"=>{:controller=>"products", :action=>"random_api", :format=>"json"}, "action_controller.instance"=>#<ProductsController:0xb52f110 ...>, "action_dispatch.request.content_type"=>nil, "action_dispatch.request.request_parameters"=>{}, "rack.request.query_string"=>"token=1234567890", "rack.request.query_hash"=>{"token"=>"1234567890"}, "action_dispatch.request.query_parameters"=>{"token"=>"1234567890"}, "action_dispatch.request.parameters"=>{"token"=>"1234567890", "controller"=>"products", "action"=>"random_api", "format"=>"json"}, "action_dispatch.request.formats"=>[application/json]}, @filtered_parameters={"token"=>"1234567890", "controller"=>"products", "action"=>"random_api", "format"=>"json"}, @method="GET", @fullpath="/api/v1/product.json?token=1234567890">>, @_request=#<ActionDispatch::Request:0xb52efd0 @env={"SERVER_SOFTWARE"=>"thin 1.3.1 codename Triple Espresso", "SERVER_NAME"=>"gamertiser.com", "rack.input"=>#<StringIO:0xb3fc1f8>, "rack.version"=>[1, 0], "rack.errors"=>#<IO:/root/backend/American-Lit-315/log/thin.log>, "rack.multithread"=>false, "rack.multiprocess"=>false, "rack.run_once"=>false, "REQUEST_METHOD"=>"GET", "REQUEST_PATH"=>"/api/v1/product.json", "PATH_INFO"=>"/api/v1/product.json", "QUERY_STRING"=>"token=1234567890", "REQUEST_URI"=>"/api/v1/product.json?token=1234567890", "HTTP_VERSION"=>"HTTP/1.1", "HTTP_HOST"=>"gamertiser.com", "HTTP_CONNECTION"=>"keep-alive", "GATEWAY_INTERFACE"=>"CGI/1.2", "SERVER_PORT"=>"80", "SERVER_PROTOCOL"=>"HTTP/1.1", "rack.url_scheme"=>"http", "SCRIPT_NAME"=>"", "REMOTE_ADDR"=>"67.170.239.66", "async.callback"=>#<Method: Thin::Connection#post_process>, "async.close"=>#<EventMachine::DefaultDeferrable:0xb3fbf3c>, "action_dispatch.parameter_filter"=>[:password], "action_dispatch.secret_token"=>"baf4b429612c3139f79d23cf551fc4dc6f9db5f1bf4e9f6fac9052d4a386fd6fcf75b7e593d8e436863ada3ef313147e783ec6ebc64e2b73bfabd06be5e50372", "action_dispatch.show_exceptions"=>true, "action_dispatch.remote_ip"=>67.170.239.66, "rack.session"=>{}, "rack.session.options"=>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :id=>nil}, "action_dispatch.cookies"=>{}, "action_dispatch.request.unsigned_session_cookie"=>{}, "warden"=>Warden::Proxy:94375900 @config={:default_scope=>:publisher, :scope_defaults=>{}, :default_strategies=>{:publisher=>[:rememberable, :database_authenticatable], :company=>[:rememberable, :database_
body: authenticatable], :user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0xa67f9f8>}, "action_dispatch.request.path_parameters"=>{:controller=>"products", :action=>"random_api", :format=>"json"}, "action_controller.instance"=>#<ProductsController:0xb52f110 ...>, "action_dispatch.request.content_type"=>nil, "action_dispatch.request.request_parameters"=>{}, "rack.request.query_string"=>"token=1234567890", "rack.request.query_hash"=>{"token"=>"1234567890"}, "action_dispatch.request.query_parameters"=>{"token"=>"1234567890"}, "action_dispatch.request.parameters"=>{"token"=>"1234567890", "controller"=>"products", "action"=>"random_api", "format"=>"json"}, "action_dispatch.request.formats"=>[application/json]}, @filtered_parameters={"token"=>"1234567890", "controller"=>"products", "action"=>"random_api", "format"=>"json"}, @method="GET", @fullpath="/api/v1/product.json?token=1234567890">, @_env={"SERVER_SOFTWARE"=>"thin 1.3.1 codename Triple Espresso", "SERVER_NAME"=>"gamertiser.com", "rack.input"=>#<StringIO:0xb3fc1f8>, "rack.version"=>[1, 0], "rack.errors"=>#<IO:/root/backend/American-Lit-315/log/thin.log>, "rack.multithread"=>false, "rack.multiprocess"=>false, "rack.run_once"=>false, "REQUEST_METHOD"=>"GET", "REQUEST_PATH"=>"/api/v1/product.json", "PATH_INFO"=>"/api/v1/product.json", "QUERY_STRING"=>"token=1234567890", "REQUEST_URI"=>"/api/v1/product.json?token=1234567890", "HTTP_VERSION"=>"HTTP/1.1", "HTTP_HOST"=>"gamertiser.com", "HTTP_CONNECTION"=>"keep-alive", "GATEWAY_INTERFACE"=>"CGI/1.2", "SERVER_PORT"=>"80", "SERVER_PROTOCOL"=>"HTTP/1.1", "rack.url_scheme"=>"http", "SCRIPT_NAME"=>"", "REMOTE_ADDR"=>"67.170.239.66", "async.callback"=>#<Method: Thin::Connection#post_process>, "async.close"=>#<EventMachine::DefaultDeferrable:0xb3fbf3c>, "action_dispatch.parameter_filter"=>[:password], "action_dispatch.secret_token"=>"baf4b429612c3139f79d23cf551fc4dc6f9db5f1bf4e9f6fac9052d4a386fd6fcf75b7e593d8e436863ada3ef313147e783ec6ebc64e2b73bfabd06be5e50372", "action_dispatch.show_exceptions"=>true, "action_dispatch.remote_ip"=>67.170.239.66, "rack.session"=>{}, "rack.session.options"=>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :id=>nil}, "action_dispatch.cookies"=>{}, "action_dispatch.request.unsigned_session_cookie"=>{}, "warden"=>Warden::Proxy:94375900 @config={:default_scope=>:publisher, :scope_defaults=>{}, :default_strategies=>{:publisher=>[:rememberable, :database_authenticatable], :company=>[:rememberable, :database_authenticatable], :user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0xa67f9f8>}, "action_dispatch.request.path_parameters"=>{:controller=>"products", :action=>"random_api", :format=>"json"}, "action_controller.instance"=>#<ProductsController:0xb52f110 ...>, "action_dispatch.request.content_type"=>nil, "action_dispatch.request.request_parameters"=>{}, "rack.request.query_string"=>"token=1234567890", "rack.request.query_hash"=>{"token"=>"1234567890"}, "a
debug - served static content /socket.io.js
body: ction_dispatch.request.query_parameters"=>{"token"=>"1234567890"}, "action_dispatch.request.parameters"=>{"token"=>"1234567890", "controller"=>"products", "action"=>"random_api", "format"=>"json"}, "action_dispatch.request.formats"=>[application/json]}, @lookup_context=#<ActionView::LookupContext:0xb52e0e4 @details_key=nil, @details={:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :json_builder], :formats=>[:json], :locale=>[:en, :en]}, @skip_default_locale=false, @frozen_formats=false, @view_paths=[/root/backend/American-Lit-315/app/views, /opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/devise-1.5.3/app/views]>, @_action_name="random_api", @_response_body=nil>
action_dispatch.cookies: {}
action_dispatch.parameter_filter: [:password]
action_dispatch.remote_ip: 67.170.239.66
action_dispatch.request.content_type: nil
action_dispatch.request.formats: [application/json]
action_dispatch.request.parameters: {"token"=>"1234567890", "controller"=>"products", "action"=>"random_api", "format"=>"json"}
action_dispatch.request.path_parameters: {:controller=>"products", :action=>"random_api", :format=>"json"}
action_dispatch.request.query_
body: parameters: {"token"=>"1234567890"}
action_dispatch.request.request_parameters: {}
action_dispatch.request.unsigned_session_cookie: {}
action_dispatch.secret_token: "baf4b429612c3139f79d23cf551fc4dc6f9db5f1bf4e9f6fac9052d4a386fd6fcf75b7e593d8e436863ada3ef313147e783ec6ebc64e2b73bfabd06be5e50372"
action_dispatch.show_exceptions: true
async.callback: #<Method: Thin::Connection#post_process>
async.close: #<EventMachine::DefaultDeferrable:0xb3fbf3c>
rack.errors: #<IO:/root/backend/American-Lit-315/log/thin.log>
rack.input: #<StringIO:0xb3fc1f8>
rack.multiprocess: false
rack.multithread: false
rack.request.query_hash: {"token"=>"1234567890"}
rack.request.query_string: "token=1234567890"
rack.run_once: false
rack.session: {}
rack.session.options: {:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :id=>nil}
rack.url_scheme: "http"
rack.version: [1, 0]
warden: Warden::Proxy:94375900 @config={:default_scope=>:publisher, :scope_defaults=>{}, :default_strategies=>{:publisher=>[:rememberable, :database_authenticatable], :company=>[:rememberable, :database_authenticatable], :user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0xa67f9f8>}

Response

Headers:

None