Skip to content

Conversation

@jasl
Copy link
Contributor

@jasl jasl commented Dec 7, 2025

Types of Changes

I'm using the latest main branch of Rails and integrating Falcon.

When I start the server, I got error

$ rails s
=> Booting Falcon v0.52.4
=> Rails 8.2.0.alpha application starting in development http://localhost:3000
=> Run `bin/rails server --help` for more startup options
Exiting
/Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/console-adapter-rails-0.4.1/lib/console/adapter/rails/railtie.rb:25:in 'block in <class:Railtie>': undefined method 'detach_from' for class ActionController::LogSubscriber (NoMethodError)

					::ActionController::LogSubscriber.detach_from :action_controller
					                                 ^^^^^^^^^^^^
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/activesupport/lib/active_support/lazy_load_hooks.rb:94:in 'block in ActiveSupport::LazyLoadHooks#execute_hook'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/activesupport/lib/active_support/lazy_load_hooks.rb:87:in 'ActiveSupport::LazyLoadHooks#with_execution_control'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/activesupport/lib/active_support/lazy_load_hooks.rb:92:in 'ActiveSupport::LazyLoadHooks#execute_hook'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/activesupport/lib/active_support/lazy_load_hooks.rb:78:in 'block in ActiveSupport::LazyLoadHooks#run_load_hooks'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/activesupport/lib/active_support/lazy_load_hooks.rb:77:in 'Array#each'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/activesupport/lib/active_support/lazy_load_hooks.rb:77:in 'ActiveSupport::LazyLoadHooks#run_load_hooks'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/application/finisher.rb:93:in 'block in <module:Finisher>'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/initializable.rb:24:in 'BasicObject#instance_exec'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/initializable.rb:24:in 'Rails::Initializable::Initializer#run'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/initializable.rb:103:in 'block in Rails::Initializable#run_initializers'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:231:in 'block in TSort.tsort_each'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:353:in 'block (2 levels) in TSort.each_strongly_connected_component'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:434:in 'TSort.each_strongly_connected_component_from'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:352:in 'block in TSort.each_strongly_connected_component'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/initializable.rb:59:in 'Array#each'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/initializable.rb:59:in 'Rails::Initializable::Collection#each'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:350:in 'Method#call'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:350:in 'TSort.each_strongly_connected_component'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:229:in 'TSort.tsort_each'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/tsort-0.2.0/lib/tsort.rb:208:in 'TSort#tsort_each'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/initializable.rb:102:in 'Rails::Initializable#run_initializers'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/application.rb:442:in 'Rails::Application#initialize!'
	from /Users/jasl/Workspaces/vibe_the_world/config/environment.rb:5:in '<main>'
	from config.ru:3:in 'Kernel#require_relative'
	from config.ru:3:in 'block (2 levels) in <main>'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/rack-3.2.4/lib/rack/builder.rb:108:in 'Kernel#eval'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/rack-3.2.4/lib/rack/builder.rb:108:in 'Rack::Builder.new_from_string'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/rack-3.2.4/lib/rack/builder.rb:97:in 'Rack::Builder.load_file'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/rack-3.2.4/lib/rack/builder.rb:67:in 'Rack::Builder.parse_file'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/rackup-2.3.1/lib/rackup/server.rb:354:in 'Rackup::Server#build_app_and_options_from_config'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/rackup-2.3.1/lib/rackup/server.rb:263:in 'Rackup::Server#app'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/rackup-2.3.1/lib/rackup/server.rb:424:in 'Rackup::Server#wrapped_app'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/commands/server/server_command.rb:76:in 'Rails::Server#log_to_stdout'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/commands/server/server_command.rb:36:in 'Rails::Server#start'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/commands/server/server_command.rb:145:in 'block in Rails::Command::ServerCommand#perform'
	from <internal:kernel>:91:in 'Kernel#tap'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/commands/server/server_command.rb:136:in 'Rails::Command::ServerCommand#perform'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/thor-1.4.0/lib/thor/command.rb:28:in 'Thor::Command#run'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/thor-1.4.0/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/command/base.rb:176:in 'Rails::Command::Base#invoke_command'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/thor-1.4.0/lib/thor.rb:538:in 'Thor.dispatch'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/command/base.rb:71:in 'Rails::Command::Base.perform'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/command.rb:65:in 'block in Rails::Command.invoke'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/command.rb:143:in 'Rails::Command.with_argv'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/command.rb:63:in 'Rails::Command.invoke'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-5724b1c7be45/railties/lib/rails/commands.rb:18:in '<main>'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
	from /Users/jasl/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/bootsnap-1.19.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require'
	from bin/rails:5:in '<main>'

This patch fixed the issue

$ rails s
=> Booting Falcon v0.52.4
=> Rails 8.2.0.alpha application starting in development http://localhost:3000
=> Run `bin/rails server --help` for more startup options
 0.32s     info: Rails: Reading HTTP/1.1 requests for Async::HTTP::Protocol::HTTP1::Server. [ec=0x1f20] [pid=87284] [2025-12-07 20:54:26 +0800]
               | Processing by HomeController#index as HTML
 0.33s     info: Rails: Reading HTTP/1.1 requests for Async::HTTP::Protocol::HTTP1::Server. [ec=0x1f20] [pid=87284] [2025-12-07 20:54:26 +0800]
               |   Rendered home/index.html.erb within layouts/application (Duration: 0.1ms | GC: 0.0ms)
 0.33s     info: Rails: Reading HTTP/1.1 requests for Async::HTTP::Protocol::HTTP1::Server. [ec=0x1f20] [pid=87284] [2025-12-07 20:54:26 +0800]
               |   Rendered layout layouts/application.html.erb (Duration: 4.9ms | GC: 0.0ms)
 0.33s     info: process_action.action_controller: Reading HTTP/1.1 requests for Async::HTTP::Protocol::HTTP1::Server. [ec=0x1f20] [pid=87284] [2025-12-07 20:54:26 +0800]
               | {
               |   "controller": "HomeController",
               |   "action": "index",
               |   "format": "html",
               |   "method": "GET",
               |   "path": "/",
               |   "status": 200,
               |   "view_runtime": 7.593999996781349,
               |   "db_runtime": 0.0,
               |   "queries_count": 0,
               |   "cached_queries_count": 0,
               |   "source_address": "::1",
               |   "allocations": 17663,
               |   "duration": 16.033000007271767
               | }
 0.33s     info: Rails: Reading HTTP/1.1 requests for Async::HTTP::Protocol::HTTP1::Server. [ec=0x1f20] [pid=87284] [2025-12-07 20:54:26 +0800]
               | Completed 200 OK in 16ms (Views: 7.6ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
               |

Contribution

@jasl
Copy link
Contributor Author

jasl commented Dec 7, 2025

@ioquatix
Because of the error, falcon-rails doesn't work with the latest Rails.
Could you take a look?

@ioquatix
Copy link
Member

ioquatix commented Dec 7, 2025

This looks okay to me, but how about backwards compatibility, or setting the minimum Rails version?

@jasl
Copy link
Contributor Author

jasl commented Dec 7, 2025

This looks okay to me, but how about backwards compatibility, or setting the minimum Rails version?

Can we set the minimum Rails version to 8.0?

@jasl
Copy link
Contributor Author

jasl commented Dec 7, 2025

BTW, the macOS CI fail doesn't relate to the PR, but I shall take a look

@jasl
Copy link
Contributor Author

jasl commented Dec 7, 2025

I'm testing CI here jasl#1

@jasl
Copy link
Contributor Author

jasl commented Dec 7, 2025

@ioquatix
Set the minimum Rails to 7.0, I think this is OK
JRuby and Documentation Coverage fail.

Could you retake a look?

@jasl jasl marked this pull request as draft December 7, 2025 14:31
@jasl
Copy link
Contributor Author

jasl commented Dec 7, 2025

Sorry, need to rework, I thought it was a simple change...

There's a breaking change recently rails/rails#55900

@jasl jasl marked this pull request as ready for review December 7, 2025 14:57
@jasl jasl force-pushed the patch-1 branch 6 times, most recently from 365433e to 35af4a1 Compare December 7, 2025 15:33
jasl added 3 commits December 7, 2025 23:36
Fix `undefined method 'detach_from' for class ActionController::LogSubscriber (NoMethodError)`
@jasl
Copy link
Contributor Author

jasl commented Dec 7, 2025

The change is ready

@ioquatix ioquatix merged commit debebe6 into socketry:main Dec 9, 2025
18 of 20 checks passed
@ioquatix
Copy link
Member

ioquatix commented Dec 9, 2025

Thanks for sorting this out.

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

Successfully merging this pull request may close these issues.

2 participants