Warn instead of raising on missing manifest.js#546
Open
mamhoff wants to merge 3 commits intorails:masterfrom
Open
Warn instead of raising on missing manifest.js#546mamhoff wants to merge 3 commits intorails:masterfrom
manifest.js#546mamhoff wants to merge 3 commits intorails:masterfrom
Conversation
Bundler `latest` has stopped working with older Rubies. We need to specify the Bundler version for the older Rubies to still build.
See rails/rails#54260 for context.
7bacda1 to
4b59d14
Compare
Contributor
Author
|
Rebased on #547 to get the CI green. |
c4144a3 to
3288686
Compare
With a pristine (`rails new`) Rails 8.0 app, the `app/assets/config/manifest.js` file is no longer automatically generated. For engines still using sprockets, that is not a huge issue, because they have and add their own manifest files for their assets to the list of precompiled assets. However, scripts like the Solidus bin/sandbox script[1] first run `rails new`, then add the needed engines to the sandbox's `Gemfile`, then run `rails db:migrate` and their respective install generators. With Rails 8, these scripts now fail before anything is possible in Ruby, because the initializer of `Sprockets::Railtie` will raise an error on startup. This commit changes the behavior of the Railtie to issue a deprecation warning instead of raising an Exception. [1] https://github.com/solidusio/solidus/blob/main/bin/sandbox#L44-L99
3288686 to
3b36794
Compare
tvdeyen
reviewed
Feb 17, 2025
tvdeyen
left a comment
There was a problem hiding this comment.
Thanks. This will help every Rails 8 app to even boot when a gem depends on sprockets-rails. Please merge this 🙏🏻
Merged
4 tasks
tvdeyen
added a commit
to blish/solidus
that referenced
this pull request
Feb 18, 2025
Due to a bug in sprockets-rails[1] we need to manually add the sprockets manifest into the generated rails app before running any rails commands inside the rails app folder. [1](rails/sprockets-rails#546)
4 tasks
tvdeyen
added a commit
to blish/solidus
that referenced
this pull request
Feb 18, 2025
Due to a bug in sprockets-rails[1] we need to manually add the sprockets manifest into the generated rails app before running any rails commands inside the rails app folder. [1](rails/sprockets-rails#546)
tvdeyen
added a commit
to blish/solidus
that referenced
this pull request
Feb 18, 2025
Due to a bug in sprockets-rails[1] we need to manually add the sprockets manifest into the generated rails app before running any rails commands inside the rails app folder. [1](rails/sprockets-rails#546)
tvdeyen
added a commit
to blish/solidus
that referenced
this pull request
May 29, 2025
This needs be done before we are able to run any rails commands in the rails apps folder. See rails/sprockets-rails#546
|
@rafaelfranca sorry for the ping, but someone please needs to merge this as this breaks all Rails apps still using sprockets. Try this |
tvdeyen
added a commit
to blish/solidus
that referenced
this pull request
May 29, 2025
This needs be done before we are able to run any rails commands in the rails apps folder. See rails/sprockets-rails#546
github-actions bot
pushed a commit
to solidusio/solidus
that referenced
this pull request
May 30, 2025
This needs be done before we are able to run any rails commands in the rails apps folder. See rails/sprockets-rails#546 (cherry picked from commit 7520d8f)
|
Just ran into this problem again when creating a new rails app with Solidus If anyone has time to take another look at at this PR, I think it will save other folks confusion as time goes on. 🙏 |
jarednorman
added a commit
to SuperGoodSoft/solidus_starter_frontend
that referenced
this pull request
Jan 8, 2026
Until the PR linked below is merged, we need to instruct people to create the manifest.js file so that the generator doesn't error. rails/sprockets-rails#546
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a pristine (
rails new) Rails 8.0 app, theapp/assets/config/manifest.jsfile is no longer automatically generated. For engines still using sprockets, that is not a huge issue, because they have and add their own manifest files for their assets to the list of precompiled assets.However, scripts like the Solidus bin/sandbox script first run
rails new, then add the needed engines to the sandbox'sGemfile, then runrails db:migrateand their respective install generators. With Rails 8, these scripts now fail before anything is possible in Ruby, because the initializer ofSprockets::Railtiewill raise an error on startup.This commit changes the behavior of the Railtie to issue a deprecation warning instead of raising an Exception.