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

loads the rails engine for rails 8 versions #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thenano
Copy link

@thenano thenano commented Nov 15, 2024

No description provided.

@thenano thenano changed the title loads the rails engine for rails 8 versions. fixes https://github.com/tsechingho/chosen-rails/issues/124 loads the rails engine for rails 8 versions Nov 15, 2024
@thenano
Copy link
Author

thenano commented Nov 15, 2024

fixes #124

@srghma
Copy link

srghma commented Jan 8, 2025

be-1                   | /usr/local/bundle/gems/railties-8.0.1/lib/rails/railtie/configuration.rb:109:in 'Rails::Railtie::Configuration#method_missing': undefined method 'assets' for an instance of Rails::Engine::Configuration (NoMethodError)
be-1                   |        from /usr/local/bundle/bundler/gems/chosen-rails-f76f4d926a97/lib/chosen-rails/engine.rb:4:in '<class:Engine>'
be-1                   |        from /usr/local/bundle/bundler/gems/chosen-rails-f76f4d926a97/lib/chosen-rails/engine.rb:3:in '<module:Rails>'
be-1                   |        from /usr/local/bundle/bundler/gems/chosen-rails-f76f4d926a97/lib/chosen-rails/engine.rb:2:in '<module:Chosen>'
be-1                   |        from /usr/local/bundle/bundler/gems/chosen-rails-f76f4d926a97/lib/chosen-rails/engine.rb:1:in '<top (required)>'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
be-1                   |        from /usr/local/bundle/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in 'Kernel#require'
be-1                   |        from /usr/local/bundle/bundler/gems/chosen-rails-f76f4d926a97/lib/chosen-rails.rb:10:in '<top (required)>'
be-1                   |        from <internal:/usr/local/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'
be-1                   |        from <internal:/usr/local/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel.replace_require'
be-1                   |        from /usr/local/bundle/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in 'Kernel.require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundler/runtime.rb:65:in 'block (2 levels) in Bundler::Runtime#require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundler/runtime.rb:60:in 'Array#each'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundler/runtime.rb:60:in 'block in Bundler::Runtime#require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundler/runtime.rb:52:in 'Array#each'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundler/runtime.rb:52:in 'Bundler::Runtime#require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundler.rb:216:in 'Bundler.require'
be-1                   |        from /app/config/application.rb:7:in '<top (required)>'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/commands/server/server_command.rb:139:in 'block in Rails::Command::ServerCommand#perform'
be-1                   |        from <internal:kernel>:91:in 'Kernel#tap'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/commands/server/server_command.rb:136:in 'Rails::Command::ServerCommand#perform'
be-1                   |        from /usr/local/bundle/gems/thor-1.3.2/lib/thor/command.rb:28:in 'Thor::Command#run'
be-1                   |        from /usr/local/bundle/gems/thor-1.3.2/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/command/base.rb:178:in 'Rails::Command::Base#invoke_command'
be-1                   |        from /usr/local/bundle/gems/thor-1.3.2/lib/thor.rb:538:in 'Thor.dispatch'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/command/base.rb:73:in 'Rails::Command::Base.perform'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/command.rb:65:in 'block in Rails::Command.invoke'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/command.rb:143:in 'Rails::Command.with_argv'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/command.rb:63:in 'Rails::Command.invoke'
be-1                   |        from /usr/local/bundle/gems/railties-8.0.1/lib/rails/commands.rb:18:in '<top (required)>'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
be-1                   |        from /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
be-1                   |        from bin/rails:4:in '<main>'
be-1 exited with code 1

@srghma
Copy link

srghma commented Jan 8, 2025

fixed

@cgunther
Copy link
Contributor

Thanks, I used this to unblock my upgrade to v8.

I wonder if rather than simply appending v8, whether it'd make more sense to tweak the conditional to always require the engine for v4+, otherwise we're going to be in the same position once v9 is released, and so on.

Alternatively, maybe it's time to drop support for below Rails 4, then we can require the engine across the board without a version check, being more future-proof. Rails 3 last saw a release in 2016. Rails themselves are only currently supporting v7.2+, or v7.0+ when it comes to security issues.
https://rubyonrails.org/maintenance

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.

3 participants