-
Notifications
You must be signed in to change notification settings - Fork 283
Description
Hi,
I'm experimenting wit websocket-rails and stumbeled over a strange problem. My setup:
Two rails processes with thin on different ports. My config is
config.standalone = false config.synchronize = true config.redis_options = { :host => 'localhost', :port => '6379'}
Everythign seems to work fine, I can send recive messages on the different ports, I can even send messages to the channels from the rails console. But if I want to send to a publi channel from a usual rails controller :
`
WebsocketRails[:all_chat].trigger(:chat_msg,
{:txt => 'hallo', :user_name => :system})
`
I get the following error:
`
Exiting
/home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:331:in 'rescue in establish_connection': Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) (Redis::CannotConnectError)
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:317:in 'establish_connection'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:94:in 'block in connect'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:279:in 'with_reconnect'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:93:in 'connect'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:350:in 'ensure_connected'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:207:in 'block in process'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:292:in 'logging'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:206:in 'process'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis/client.rb:112:in 'call'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis.rb:2022:in 'block in publish'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis.rb:37:in 'block in synchronize'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/monitor.rb:211:in 'mon_synchronize'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis.rb:37:in 'synchronize'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/redis-3.2.1/lib/redis.rb:2021:in 'publish'
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/websocket-rails-712fd4e35325/lib/websocket_rails/synchronization.rb:63:in 'block in publish'
vagrant@fixingthenet:/vagrant/apps/fixingthenet-root$
`
The redis server is there (I can chat on different processes). Thx for your help