I’m trying to debug an issue with my application and I’m wanting to remove Action Cable temporarily. How can I do this, where when the server starts Action Cable doesn’t, yet I don’t have to remove all my code that I’ve already put in place? Thanks!
Do you have controller methods or initializers that call ActionCable directly by name? Because if not, I suppose just commenting out that gem and bundling and restarting would get "rid" of it temporarily. But if you had any code that called it, that would bomb and your app would not start up. I suspect you're going to have to go through the app and put a feature flag around the whole thing, so you can turn it off and on with a config variable.
Well as far as I know the Action Cable gem is a dependency of ActiveSupport ? So I can’t comment out that line in my Gemfile.
In application.rb you can require all of rails modules with require rails/all. To not require modules, you have to require them specifically:
To remove ActionCable, you would remove require “action_cable/railtie”