Ruby on rails Rails服务器未在rake任务中使用web套接字和redis选项启动。

Ruby on rails Rails服务器未在rake任务中使用web套接字和redis选项启动。,ruby-on-rails,websocket,redis,rake,Ruby On Rails,Websocket,Redis,Rake,我必须在rake任务中使用WebSocket,为此我将event.rb更改为 config.synchronize = true # Uncomment and edit to point to a different redis instance. # Will not be used unless standalone or synchronization mode # is enabled. config.redis_options = {:host => 'lo

我必须在rake任务中使用WebSocket,为此我将event.rb更改为

 config.synchronize = true  
  # Uncomment and edit to point to a different redis instance.
  # Will not be used unless standalone or synchronization mode
  # is enabled.
 config.redis_options = {:host => 'localhost', :port => '3000'}
当我启动rails服务器时,出现以下错误:

! Invalid request
Exiting
/usr/local/rvm/gems/ruby-1.9.3-p194@socialmail/gems/redis-3.0.4/lib/redis/connection/synchrony.rb:115:in `read':  Got 'Protocol error, got "H" as reply type byte' as initial reply byte. If you're in a forking environment, such as Unicorn, you need to connect to Redis after forking.  (Redis::ProtocolError)
我做错了什么


谢谢

嘿,谢谢你的提问,我个人无法将我的rake任务发布到我在rails服务器上打开的websocket频道。您的同步命令有帮助(同时在本地启动Redis服务器)

你的问题通过-似乎你指向3000。这是您的rails服务器还是Redis实例?如果您在本地运行它,我会忽略这一行