Can't get a simple ruby Example working for pubnub -
require 'pubnub' pubnub = pubnub.new( :publish_key => 'demo', :subscribe_key => 'demo' ) pubnub.publish( :channel => 'the angular channel', :message => 'hello pubnub, love ruby sdk!', ) { |data| puts data.response }
i followed example sdk documentation page. not sure went wrong. try using angular channel demo, can subscribe, using ruby script can't seem make work.
the log printed pubnub log.
created new pubnub::client instance d, [2015-06-14t16:54:05.940851 #33052] debug -- pubnub: event#initialize | initialized pubnub::publish d, [2015-06-14t16:54:05.940972 #33052] debug -- pubnub: pubnub::publish#uri http://pubsub.pubnub.com/publish/demo/demo/0/the%20angular%20channel/0/%22hello%20pubnub%2c%20love%20the%20ruby%20sdk%21%22?pnsdk=pubnub-ruby/3.7.1&uuid=065e1ab5-e87c-4fb2-a07d-b78bd8243610 i, [2015-06-14t16:54:05.941349 #33052] info -- pubnub: bytesize: 189 d, [2015-06-14t16:54:05.941445 #33052] debug -- pubnub: pubnub::publish#uri http://pubsub.pubnub.com/publish/demo/demo/0/the%20angular%20channel/0/%22hello%20pubnub%2c%20love%20the%20ruby%20sdk%21%22?pnsdk=pubnub-ruby/3.7.1&uuid=065e1ab5-e87c-4fb2-a07d-b78bd8243610 i, [2015-06-14t16:54:05.941521 #33052] info -- pubnub: length: 189 d, [2015-06-14t16:54:05.941546 #33052] debug -- pubnub: created event pubnub::publish d, [2015-06-14t16:54:05.941566 #33052] debug -- pubnub: pubnub::singleevent#fire d, [2015-06-14t16:54:05.941585 #33052] debug -- pubnub: pubnub::singleevent#fire | adding event async_events d, [2015-06-14t16:54:05.941604 #33052] debug -- pubnub: pubnub::singleevent#fire | starting railgun d, [2015-06-14t16:54:05.941622 #33052] debug -- pubnub: pubnub::client#start_event_machine | starting em in new thread d, [2015-06-14t16:54:05.941641 #33052] debug -- pubnub: pubnub::client#start_event_machine | aren't running on thin d, [2015-06-14t16:54:05.948131 #33052] debug -- pubnub: pubnub::client#start_event_machine | em started in new thread d, [2015-06-14t16:54:05.948225 #33052] debug -- pubnub: pubnub::client#start_railgun | initializing railgun d, [2015-06-14t16:58:22.993076 #33140] debug -- pubnub: symbolizing options keys d, [2015-06-14t16:58:22.993217 #33140] debug -- pubnub: setting default values d, [2015-06-14t16:58:22.993306 #33140] debug -- pubnub:
Comments
Post a Comment