0

我在 Heroku 上部署了我的 Rails 6 应用程序(带有刺激反射)。一切都可以找到,包括我的 jQuery 和 JS,但任何与刺激-relfex 相关的东西都不起作用?在我的本地开发机器上一切正常。有任何想法吗?

4

2 回答 2

1

You give very little information, but my first guess would be to check the config/cable.yml. It is misleading, but ActionCable "just works" in development, while in production mode one has to configure a pubsub queueing system. The default is set to "redis", which is a (payable?) add-on on heroku, and if you already use redis, it has to be configured/linked correctly in the cable.yml.

A very simple solution is to use postgresql as the pubsub queue, which you are probably already using (on heroku), and is as simple as writing

 production:
   adapter: postgresql
于 2020-10-07T10:03:59.793 回答
0

将heroku上的redis插件添加到您的应用程序中也许可行..

于 2021-06-02T23:26:31.577 回答