gem version 2.3.1
require 'nsq'
producer = Nsq::Producer.new(nsqlookupd: ['127.0.0.1:4161'], topic: 'qlc')
puts producer.connected?
producer.write('hello world')
producer.terminate
this cause:
gems/nsq-ruby-2.3.1/lib/nsq/producer.rb:92:in connection_for_write': No connections available (RuntimeError) from /home/was/.rvm/gems/ruby-2.2.2@425on222/gems/nsq-ruby-2.3.1/lib/nsq/producer.rb:65:in write_to_topic'
from /home/was/.rvm/gems/ruby-2.2.2@425on222/gems/nsq-ruby-2.3.1/lib/nsq/producer.rb:42:in write' from test.rb:6:in
'