I've tried to get realtime to work for the last 3 hours.
No message is ever sent and the queue just grows.
Did anyone get it working?
require 'eventmachine'
require 'ably'
log = Logger.new(STDOUT)
log.level = Logger::WARN
EventMachine.run do
ably = Ably::Realtime.new(key: 'xxxx', logger: log)
ably.connection.on do |state_change|
puts state_change.current #=> :connected
puts state_change.previous #=> :connecting
end
channel = ably.channels.get('sport')
d = channel.attach do
loop do
puts channel.attached?
puts channel.publish('update', 'team' => 'Man United')
sleep 1
end
end
end
I've tried to get realtime to work for the last 3 hours.
No message is ever sent and the queue just grows.
Did anyone get it working?