-
Notifications
You must be signed in to change notification settings - Fork 247
Warn instead of raising on missing manifest.js
#546
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
base: master
Are you sure you want to change the base?
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This will help every Rails 8 app to even boot when a gem depends on sprockets-rails
. Please merge this 🙏🏻
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)
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)
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)
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
|
This needs be done before we are able to run any rails commands in the rails apps folder. See rails/sprockets-rails#546
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)
With a pristine (
rails new
) Rails 8.0 app, theapp/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 first run
rails new
, then add the needed engines to the sandbox'sGemfile
, then runrails db:migrate
and their respective install generators. With Rails 8, these scripts now fail before anything is possible in Ruby, because the initializer ofSprockets::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.