Skip to content

0.0.8 breaks Rails apps not using importmaps #10

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

Closed
JamesChevalier opened this issue Feb 4, 2022 · 4 comments
Closed

0.0.8 breaks Rails apps not using importmaps #10

JamesChevalier opened this issue Feb 4, 2022 · 4 comments

Comments

@JamesChevalier
Copy link

% bundle exec rails c
/Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `importmap' for [...]
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/requestjs-rails-0.0.8/lib/requestjs/engine.rb:10:in `block in <class:Engine>'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `instance_exec'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `run'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:61:in `block in run_initializers'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:347:in `each'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:347:in `call'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:60:in `run_initializers'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/application.rb:391:in `initialize!'
        from /Users/me/Documents/app/config/environment.rb:5:in `<main>'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/application.rb:367:in `require_environment!'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/command/actions.rb:28:in `require_environment!'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/commands/console/console_command.rb:101:in `perform'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/command/base.rb:69:in `perform'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/command.rb:48:in `invoke'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/railties-6.1.4.4/lib/rails/commands.rb:18:in `<main>'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /Users/me/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from bin/rails:4:in `<main>'

Let me know if you need any more information to help diagnose this.

@marcelolx
Copy link
Collaborator

@JamesChevalier Please try change your Gemfile the following ⬇️ and let me know if that fixes your problem

gem "requestjs-rails", github: "rails/requestjs-rails", branch: "main"

@JamesChevalier
Copy link
Author

That did it!

@marcelolx
Copy link
Collaborator

marcelolx commented Feb 4, 2022

v0.0.9 is live with the fix https://rubygems.org/gems/requestjs-rails/versions/0.0.9!

@marcelolx
Copy link
Collaborator

Thank you @JamesChevalier for checking that!

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