stimulusreflex / stimulus_reflex

Build reactive applications with the Rails tooling you already know and love.
https://docs.stimulusreflex.com
MIT License
2.29k stars 176 forks source link

NameError: uninitialized constant StimulusReflex::Installer::Thor when running rake tasks #701

Closed TanookiMario closed 6 months ago

TanookiMario commented 6 months ago

Bug Report

Describe the bug

Our dependabot instance recently opened a pull request to bump stimulus_reflex from 3.5.0-rc4 to 3.5.1. the specs passed but the deployment to our staging environment in heroku failed with the error NameError: uninitialized constant StimulusReflex::Installer::Thor (NameError). We attempted to run rake tasks locally with the stimulus_reflex upgrade and get the same error.

To Reproduce

Expected behavior

You should see a list of available rake tasks

Screenshots or reproduction

full output:

> bundle exec rake -P
rake aborted!
NameError: uninitialized constant StimulusReflex::Installer::Thor (NameError)

    include Thor::Base
                ^^^^^^
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/stimulus_reflex-3.5.1/lib/stimulus_reflex/installer.rb:5:in `<class:Installer>'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/stimulus_reflex-3.5.1/lib/stimulus_reflex/installer.rb:4:in `<module:StimulusReflex>'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/stimulus_reflex-3.5.1/lib/stimulus_reflex/installer.rb:3:in `<main>'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.14/lib/zeitwerk/kernel.rb:34:in `require'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/stimulus_reflex-3.5.1/lib/tasks/stimulus_reflex/stimulus_reflex.rake:3:in `<main>'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/engine.rb:661:in `load'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/engine.rb:661:in `block in run_tasks_blocks'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/engine.rb:661:in `each'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/engine.rb:661:in `run_tasks_blocks'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/application.rb:500:in `block in run_tasks_blocks'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/engine/railties.rb:15:in `each'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/engine/railties.rb:15:in `each'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/application.rb:500:in `run_tasks_blocks'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/railties-7.0.8.1/lib/rails/engine.rb:464:in `load_tasks'
/Users/ciccio/projects/boost/Rakefile:8:in `<top (required)>'
/Users/ciccio/.rvm/gems/ruby-3.2.2/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/Users/ciccio/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `eval'
/Users/ciccio/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `<main>'
(See full trace by running task with --trace)

Versions

StimulusReflex

External tools

marcoroth commented 6 months ago

Hey @TanookiMario, thanks for opening this issue! We'll get #705 merged and get this sorted in a new patch release, thank you!