You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rails new myapp --main --skip-action-cable
RAILS_ENV=production rails server
or
rails new myapp --main --skip-action-cable
sed -i -e 's/eager_load = false/eager_load = true/' config/environments/development.rb
rails server
Expected behavior
Server boots.
Actual behavior
Server does not boot and errors out:
=> Booting Puma
=> Rails 8.0.0.alpha application starting in development
=> Run `bin/rails server --help` for more startup options
Exiting
/Users/jerome/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/turbo-rails-2.0.5/app/channels/turbo/streams_channel.rb:34:in `<main>': uninitialized constant ActionCable (NameError)
class Turbo::StreamsChannel < ActionCable::Channel::Base
^^^^^^^^^^^
System configuration
Rails version: 8.0.0.alpha
Ruby version: 3.3.1
Additional information
Rails 8 has the Turbo gem included by default. But Turbo Streams depends on Action Cable. When using --skip-action-cable, the line require "action_cable/engine" is commented out in config/application.rb, which makes Turbo error out. A current workaround is to uncomment that line manually.
Some ideas for a solution:
I am not familiar with Turbo, but maybe edit the gem to disable Turbo Streams if Action Cable is not defined
Exclude turbo-rails when --skip-action-cable is supplied (suggested by @dbelling in #51768)
Ignore --skip-action-cable unless a new --skip-turbo option is supplied (to be implemented, this option does not currently exist)
Remove the --skip-action-cable option altogether, which seems too drastic
Any other idea
The text was updated successfully, but these errors were encountered:
Steps to reproduce
or
rails new myapp --main --skip-action-cable sed -i -e 's/eager_load = false/eager_load = true/' config/environments/development.rb rails server
Expected behavior
Server boots.
Actual behavior
Server does not boot and errors out:
System configuration
Rails version: 8.0.0.alpha
Ruby version: 3.3.1
Additional information
Rails 8 has the Turbo gem included by default. But Turbo Streams depends on Action Cable. When using
--skip-action-cable
, the linerequire "action_cable/engine"
is commented out inconfig/application.rb
, which makes Turbo error out. A current workaround is to uncomment that line manually.Some ideas for a solution:
--skip-action-cable
is supplied (suggested by @dbelling in #51768)--skip-action-cable
unless a new--skip-turbo
option is supplied (to be implemented, this option does not currently exist)--skip-action-cable
option altogether, which seems too drasticThe text was updated successfully, but these errors were encountered: