Commit 27a7557
committed
Warn instead of raising on missing manifest.js
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-L991 parent 266ec49 commit 27a7557
1 file changed
+14
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 63 | | |
79 | 64 | | |
80 | 65 | | |
| |||
103 | 88 | | |
104 | 89 | | |
105 | 90 | | |
106 | | - | |
107 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
108 | 105 | | |
109 | 106 | | |
110 | 107 | | |
| |||
0 commit comments