Closed christianvargasforero closed 4 years ago
@christianvargasforero Can you share your stack trace?
@christianvargasforero Can you share your stack trace?
On execute ADAPTER=any_cable RAILS_ENV=production bundle exec anycable --redis-channel="__anycable__" --server-command="anycable-go --port 3334 --redis_channel=__anycable__"
this is the production log:
I see that two errors, one of authorization, and another of the websockekt, this is the configuration that I have:
#config/cable.yml
production: adapter: :any_cable url: redis://localhost:6379 password: <%=ENV['pws']%> redis: &redis adapter: redis url: redis://localhost:6379/1 development: *redis test: adapter: async
#aplication.rb ... Bundler.require(*Rails.groups) require "anycable/rails" ...
#anycable.yml
development: rpc_host: "localhost:50051" redis_url: "redis://localhost:6379/2" access_logs_disabled: false debug: true
production: rpc_host: "localhost:50051" redis_url: "redis://localhost:6379/2" redis_channel: "anycable" access_logs_disabled: false debug: true
#production.rb
config.action_cable.allowed_request_origins = ['https://domain.com', %r{https://#{Socket.gethostname.downcase}.*}] config.action_cable.url = "wss://subdomain.domain.com/cable"
#bin/anycable
require ::File.expand_path('../../config/environment', FILE) require 'anycable-rails' Anycable.configure do |config| config.connection_factory = ActionCable.server.config.connection_class.call end Rails.application.eager_load! Anycable::Server.start
.... AnyCable.connection_factory = ActionCable.server.config.connection_class.call
This is the web console:
Change the second line in config/cable.yml to adapter: any_cable
Change the second line in config/cable.yml to adapter: any_cable
Perfect, thank you very much, excuse my carelessness
Hello,
I have the following problem, every time I go to do a brodcast I get the following message: "undefined method `camelize' for :any_cable:Symbol"
I tried in console and in the app and in both cases I have the same problem, any suggestions? Thank you!!
Ruby version: 2.4.4 Rails version: 5.2.1
anycable
gem version: 0.6.3anycable-rails
gem version: 0.6.4grpc
gem version: gRPC version: 1.24.0