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

Add Thor require for StimulusReflex::Installer #705

Merged
merged 1 commit into from
May 24, 2024

Conversation

juna-nb
Copy link
Contributor

@juna-nb juna-nb commented May 16, 2024

Description

Rake tasks were failing in projects because the required Thor dependency was not always required, depending on the way it was called.

The fix also needed to explicitly require the thor gem in the installer file that used it as a mixin.

Fixes #701

Why should this be added

Rake tasks in Rails applications were no longer working with the latest version of this Gem.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

Copy link

netlify bot commented May 16, 2024

Deploy Preview for stimulusreflex failed.

Name Link
🔨 Latest commit 2c05712
🔍 Latest deploy log https://app.netlify.com/sites/stimulusreflex/deploys/6650baf066f42e0008aa2d92

@juna-nb
Copy link
Contributor Author

juna-nb commented May 24, 2024

Just to note this change actually broke my app for some reason so this PR obviously still needs work. I'm not sure why it broke yet and this still blocks my deploys.

@juna-nb juna-nb force-pushed the main branch 2 times, most recently from e1d16a4 to 8291a41 Compare May 24, 2024 06:31
Copy link
Contributor

@julianrubisch julianrubisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'm not sure if an explicit dependency on Thor is necessary and sensible, since railties itself depends on it. I think just a require "thor" should do it?

Applications using StimulusReflex were failing
during deploys because of the Thor dependency
being referenced but not listed as a dependency.
This commit adds the require statement to the area
of the code that uses it but does not add it as a
dependency due to Thor being a dependency of
railties already.
@marcoroth marcoroth changed the title Add Thor Dependency And Require It Add Thor require for StimulusReflex::Installer May 24, 2024
Copy link
Member

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @juna-nb! 🙌🏼

@marcoroth marcoroth merged commit bdbd995 into stimulusreflex:main May 24, 2024
10 of 14 checks passed
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.

NameError: uninitialized constant StimulusReflex::Installer::Thor when running rake tasks
3 participants