0

Ruby on rails problem

Hi im, trying tropo via web api in ruby on rails but i cant get it to work and i have no idea whats going on . im just trying to do a basic hello word app

class InicioController < ApplicationController

require 'tropo-webapi-ruby'
require 'sinatra'

def index

t = Tropo::Generator.new
t.say(:value => "Hello World!")
render :json => t.response

end
end

But i get this error when calling the app to test:

Started POST "/" for 198.11.254.110 at 2015-11-23 00:43:16 +0000
Processing by InicioController#index as HTML
Parameters: {"session"=>{"id"=>"a5ab14b101db022cae1cd0c7ba5272ea", "accountId"=>"5046371", "timestamp"=>"2015-11-23T00:43:17.998Z", "userType"=>"HUMAN", "initialText"=>nil, "callId"=>"fcb4d3c3ad7384f15bab91686574bc29", "to"=>{"id"=>"9996177060", "name"=>nil, "channel"=>"VOICE", "network"=>"SIP"}, "from"=>{"id"=>"tropo.com phono", "name"=>nil, "channel"=>"VOICE", "network"=>"SIP"}, "headers"=>{"Record-Route"=>"sip:198.11.254.99:5060;transport=udp;lr", "Content-Length"=>"314", "To"=>"sip:9996177060@sip.tropo.com", "Contact"=>"sip:54.208.117.89:5060;transport=udp", "User-Agent"=>"Phono", "Max-Forwards"=>"68", "x-sid"=>"20b9c6ab964b2c6770f914af4c1efdba", "CSeq"=>"1 INVITE", "Via"=>"SIP/2.0/UDP 198.11.254.99:5060;branch=z9hG4bK1lhg478xwsxzw;rport=5060;received=10.108.198.68", "x-phono-sessionid"=>"be0b4e75-68fb-428a-8fe4-1f6f74122bc7@pgw-v11f.phono.com", "Call-ID"=>"ys126kbhvas3", "Content-Type"=>"application/sdp", "From"=>"sip:tropo.com%20phono@pgw-v11f.phono.com;tag=9fwzths9d8vw"}}, "inicio"=>{"session"=>{"id"=>"a5ab14b101db022cae1cd0c7ba5272ea", "accountId"=>"5046371", "timestamp"=>"2015-11-23T00:43:17.998Z", "userType"=>"HUMAN", "initialText"=>nil, "callId"=>"fcb4d3c3ad7384f15bab91686574bc29", "to"=>{"id"=>"9996177060", "name"=>nil, "channel"=>"VOICE", "network"=>"SIP"}, "from"=>{"id"=>"tropo.com phono", "name"=>nil, "channel"=>"VOICE", "network"=>"SIP"}, "headers"=>{"Record-Route"=>"sip:198.11.254.99:5060;transport=udp;lr", "Content-Length"=>"314", "To"=>"sip:9996177060@sip.tropo.com", "Contact"=>"sip:54.208.117.89:5060;transport=udp", "User-Agent"=>"Phono", "Max-Forwards"=>"68", "x-sid"=>"20b9c6ab964b2c6770f914af4c1efdba", "CSeq"=>"1 INVITE", "Via"=>"SIP/2.0/UDP 198.11.254.99:5060;branch=z9hG4bK1lhg478xwsxzw;rport=5060;received=10.108.198.68", "x-phono-sessionid"=>"be0b4e75-68fb-428a-8fe4-1f6f74122bc7@pgw-v11f.phono.com", "Call-ID"=>"ys126kbhvas3", "Content-Type"=>"application/sdp", "From"=>"sip:tropo.com%20phono@pgw-v11f.phono.com;tag=9fwzths9d8vw"}}}}
WARNING: Can't verify CSRF token authenticity
Completed 200 OK in 0.7ms (Views: 0.1ms | ActiveRecord: 0.0ms)

NoMethodError (undefined method options' for {}:Hash):
rack (1.6.4) lib/rack/session/abstract/id.rb:329:in
commit_session'
rack (1.6.4) lib/rack/session/abstract/id.rb:226:in context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in
call'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/cookies.rb:341:in call'
/usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:64:in
call'
/usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:479:in call'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/callbacks.rb:28:in
block in call'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:in _run__1352971548593132243__call__1484713039650595582__callbacks'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:in
__run_callback'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:385:in _run_call_callbacks'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:81:in
run_callbacks'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/callbacks.rb:27:in call'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/reloader.rb:65:in
call'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/remote_ip.rb:31:in call'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/debug_exceptions.rb:16:in
call'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/show_exceptions.rb:5

2 comments

Please sign in to leave a comment.