![](/img/trans.png)
[英]Routing Discrepancy Between Development and Production Environments (Ruby on Rails)
[英]Rails 5 ActionCable is crossing messages between development and production environments
我的开发服务器在localhost:3000上工作,生产环境在localhost:8001上正常工作,两者都在同一台计算机上。
当我在开发服务器中触发任何电缆事件时,它也会影响生产环境。
配置ActionCable以支持不同环境并防止交叉消息的最佳方法是哪种?
我找到了解决方案。
我的cable.yml文件是:
development:
adapter: redis
url: redis://127.0.0.1:6379
test:
adapter: async
production:
adapter: redis
url: redis://127.0.0.1:6379
所以我将其更改为
development:
adapter: async
test:
adapter: async
production:
adapter: redis
url: redis://127.0.0.1:6379
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.