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

Gem no longer works with rack 3.1.x #126

Open
jaybloke opened this issue Jun 25, 2024 · 2 comments
Open

Gem no longer works with rack 3.1.x #126

jaybloke opened this issue Jun 25, 2024 · 2 comments

Comments

@jaybloke
Copy link

Appears that support for rack/file has been dropped in version 3.1

Rack 3.1.0

internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- rack/file (LoadError) from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/bundle/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require' from /usr/local/bundle/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:34:in `require' from /usr/local/bundle/gems/serviceworker-rails-0.6.0/lib/serviceworker/handlers/sprockets_handler.rb:3:in `<main>' from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/bundle/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' from /usr/local/bundle/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:34:in `require' from /usr/local/bundle/gems/serviceworker-rails-0.6.0/lib/serviceworker/handlers.rb:50:in `sprockets_handler' from /usr/local/bundle/gems/serviceworker-rails-0.6.0/lib/serviceworker/handlers.rb:28:in `handler_for_name' from /usr/local/bundle/gems/serviceworker-rails-0.6.0/lib/serviceworker/handlers.rb:40:in `resolve_handler' from /usr/local/bundle/gems/serviceworker-rails-0.6.0/lib/serviceworker/handlers.rb:10:in `build' from /usr/local/bundle/gems/serviceworker-rails-0.6.0/lib/serviceworker/middleware.rb:25:in `initialize' from /usr/local/bundle/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/stack.rb:42:in `new' from /usr/local/bundle/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/stack.rb:42:in `build' from /usr/local/bundle/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/stack.rb:171:in `block in build' from /usr/local/bundle/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/stack.rb:167:in `each' from /usr/local/bundle/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/stack.rb:167:in `inject' from /usr/local/bundle/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/stack.rb:167:in `build' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/engine.rb:522:in `block in app' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/engine.rb:518:in `synchronize' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/engine.rb:518:in `app' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/application/finisher.rb:58:in `block in <module:Finisher>' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/initializable.rb:32:in `instance_exec' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/initializable.rb:32:in `run' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/initializable.rb:61:in `block in run_initializers' from /usr/local/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each' from /usr/local/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' from /usr/local/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from' from /usr/local/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component' from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each' from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `call' from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component' from /usr/local/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each' from /usr/local/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/initializable.rb:60:in `run_initializers' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/application.rb:426:in `initialize!' from /usr/src/app/config/environment.rb:5:in `<main>' from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/bundle/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' from /usr/local/bundle/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:34:in `require' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/application.rb:402:in `require_environment!' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/command/actions.rb:20:in `boot_application!' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/commands/console/console_command.rb:105:in `perform' from /usr/local/bundle/gems/thor-1.3.1/lib/thor/command.rb:28:in `run' from /usr/local/bundle/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/command/base.rb:178:in `invoke_command' from /usr/local/bundle/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/command/base.rb:73:in `perform' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/command.rb:71:in `block in invoke' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/command.rb:149:in `with_argv' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/command.rb:69:in `invoke' from /usr/local/bundle/gems/railties-7.1.3.4/lib/rails/commands.rb:18:in `<main>' from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/bundle/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' from bin/rails:4:in `<main>'

@aseroff
Copy link

aseroff commented Jul 8, 2024

Is this fixed as easily as replacing require "rack/file" with require "rack/files" and ::Rack::File.new with ::Rack::Files.new (line 27)?

#127

@aseroff
Copy link

aseroff commented Jul 8, 2024

Based on this https://github.com/rack/rack/blob/v3.0.9.1/lib/rack/file.rb it looks like the answer is yes.

@rossta

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

No branches or pull requests

2 participants