我在服务器A中安装了导轨,并创建了一个单独的服务器,其中安装了Go-lang
我的目标是将Anycable-Go与Rails一起使用,但在单独的服务器中。
我在google上确实找不到任何明确的说明,但是从doc的“ Go”服务器中尝试了以下操作:
go get -u -f github.com/anycable/anycable-go/cmd/anycable-go
然后
anycable-go --rpc_host=0.0.0.0:50051 --headers=cookie,x-api-token \
--redis_url=redis://{my_redis_username}:{my_redis_password}@{my_redis_machine_url} --redis_channel=anycable \
--host=0.0.0.0 --port=8084
输出看起来像这样:
到目前为止,我真的不确定那条路是否正确……但是,如果是这样,应该如何使我的rails应用程序连接/使用此“ anycable-go”服务器?
答案 0 :(得分:0)
您需要向应用程序中添加anycable-rails
gem,并与Rails服务器一起运行AnyCable RPC服务器(bundle exec anycable
)。参见https://docs.anycable.io/#/using_with_rails