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

Fix asset pipeline errors for plugin dummy apps #44016

Merged

Conversation

jonathanhefner
Copy link
Member

@jonathanhefner jonathanhefner commented Dec 28, 2021

To fix #43920, f292daa added sprockets-rails to the generated Gemfile for engine plugins because their dummy apps use Sprockets. However, non-engine plugins exhibit the same issue because their dummy apps also use Sprockets.

This commit forces skip_asset_pipeline to be true when a plugin is not an engine, and fixes several tests that failed to detect these issues because they were accidentally using the rails/rails Gemfile instead of the generated plugin Gemfile.

Copy link
Member

@rafaelfranca rafaelfranca left a comment

Choose a reason for hiding this comment

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

Can you split the refactoring from the commit that fix the issue?

To fix rails#43920, f292daa added
`sprockets-rails` to the generated `Gemfile` for engine plugins because
their dummy apps use Sprockets.  However, non-engine plugins exhibit the
same issue because their dummy apps also use Sprockets.

This commit forces `skip_asset_pipeline` to be true when a plugin is not
an engine, and fixes several tests that failed to detect these issues
because they were accidentally using the `rails/rails` `Gemfile` instead
of the generated plugin `Gemfile`.
@rafaelfranca rafaelfranca merged commit 776b0ce into rails:main Jan 5, 2022
rafaelfranca added a commit that referenced this pull request Jan 5, 2022
…pipeline

Fix asset pipeline errors for plugin dummy apps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In Rails 7 rails generators for engines do not work anymore
2 participants