How can I temporarily remove Action Cable from starting with my server for debugging?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I temporarily remove Action Cable from starting with my server for debugging?

David McDonald
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!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How can I temporarily remove Action Cable from starting with my server for debugging?

Walter Lee Davis
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.

Walter

> On Jan 4, 2018, at 2:34 PM, David McDonald <[hidden email]> wrote:
>
> 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!
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5FD29BA9-309F-493B-9175-45D92ECE3F9A%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How can I temporarily remove Action Cable from starting with my server for debugging?

David McDonald
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.

On Thursday, January 4, 2018 at 3:32:17 PM UTC-5, Walter Lee Davis wrote:
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.

Walter

> On Jan 4, 2018, at 2:34 PM, David McDonald <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="0QEx0wujAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">dave...@...> wrote:
>
> 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!
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="0QEx0wujAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="0QEx0wujAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ecfaf7ea-7478-4dcd-bbc2-b768d1eabd3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How can I temporarily remove Action Cable from starting with my server for debugging?

Shane Cavanaugh
In application.rb you can require all of rails modules with require rails/all. To not require modules, you have to require them specifically:

require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_cable/railtie"
require "action_view/railtie"
require "sprockets/railtie"

To remove ActionCable, you would remove  require "action_cable/railtie"

Shane

On Friday, January 5, 2018 at 8:47:14 AM UTC-5, David McDonald wrote:
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.

On Thursday, January 4, 2018 at 3:32:17 PM UTC-5, Walter Lee Davis wrote:
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.

Walter

> On Jan 4, 2018, at 2:34 PM, David McDonald <[hidden email]> wrote:
>
> 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!
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/f2b25b5c-1dfa-4800-a3b4-49052265f487%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b02043ab-4e78-4905-b774-e4ff19c3584a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.