Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionController::RoutingError (No route matches [GET] "/cable") #180

Closed
quadlol opened this issue Mar 8, 2023 · 0 comments
Closed

ActionController::RoutingError (No route matches [GET] "/cable") #180

quadlol opened this issue Mar 8, 2023 · 0 comments

Comments

@quadlol
Copy link

quadlol commented Mar 8, 2023

I have just installed the anycable-rails gem and I cannot get it working with my current multitenant setup. I am using subdomains, eg. tenant1.localhost:3000

Now, I am seeing a spam in my rails console

Request URL: ws://tenant1.localhost:3000/cable
ActionController::RoutingError (No route matches [GET] "/cable"):

This route should/have existed. How can I setup this gem with subdomains?

## dev config
Rails.application.configure do
    config.action_cable.url = ActionCable.server.config.url = ENV.fetch("CABLE_URL", "ws://localhost:8080/cable") if AnyCable::Rails.enabled?
  end

## cable.yml
development:
  adapter: <%= ENV.fetch("ACTION_CABLE_ADAPTER", "any_cable") %>

## Procfile
anycable: bundle exec anycable
ws: anycable-go --port=8080

## consumer
import { createConsumer } from '@rails/actioncable'
export default createConsumer()

Many thanks

Tell us about your environment

Ruby version: 3.1

Rails version: 6.1

anycable gem version: 1.3

anycable-rails gem version: 1.3.7

grpc gem version: 1.52

@quadlol quadlol closed this as completed Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant