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

Revise how to disable eager loading app/channels #601

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

fxn
Copy link
Contributor

@fxn fxn commented Mar 10, 2024

(This is the same as #513, which I closed by accident.)

Fixes #512.

@dhh dhh merged commit a167573 into hotwired:main Mar 11, 2024
15 checks passed
@dorianmariecom
Copy link

Thanks @dhh <3

@dorianmariecom
Copy link

@dhh Can you release a new version? That would be awesome

@fxn fxn deleted the fix-512 branch March 14, 2024 23:39
@t27duck
Copy link
Contributor

t27duck commented Apr 18, 2024

Until a new version is released, this is the workaround I've been using that seems to work out well enough...

config/application.rb:

require_relative "boot"

require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
...
# require "action_cable/engine"
...

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

# Hack as turbo-rails loads the constant from the eager load paths.
# Remove once a new version is released.
class Turbo::StreamsChannel; end unless defined?(ActionCable)

@bruno-
Copy link

bruno- commented May 27, 2024

@afcapel any chance you can release a new gem version with this fix? 🙏

This is currently breaking my app in production (I have to resort to workarounds) because I'm using mission_control-jobs which is using turbo.

Many thanks

@AxelTheGerman
Copy link

Would also appreciate a new release that includes this fix. That should also solve #587 - I was just looking into fixing that and then found the code that already fixed it is there and merged but not released.

Thank you!

mvz added a commit to mvz/playdate that referenced this pull request Aug 30, 2024
Since version 2.0.6 of turbo-rails, this is no longer needed. See
hotwired/turbo-rails#601.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Can't load turbo-rails without Action Cable starting in Rails 7.1.2
6 participants