Skip to content

Commit 28a5aa4

Browse files
committed
Create sprockets manifest for example app
https://github.com/rails/sprockets/blob/070fc01947c111d35bb4c836e9bb71962a8e0595/UPGRADING.md#manifestjs Otherwise ``` ** Invoke generate:stuff (first_time) ** Execute generate:stuff bin/rake app:template LOCATION='../../example_app_generator/generate_stuff.rb' rake aborted! Sprockets::Railtie::ManifestNeededError: Expected to find a manifest file in `app/assets/config/manifest.js` But did not, please create this file and use it to link any assets that need to be rendered by your app: Example: //= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css and restart your server ``` This, however, fails on Rails < 7: ``` # --- Caused by: --- # Sprockets::Rails::Helper::AssetNotPrecompiled: # application.css ```
1 parent af7d012 commit 28a5aa4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

example_app_generator/generate_app.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,8 @@
7878
'REPLACE_BUNDLE_PATH',
7979
bundle_install_path
8080
chmod 'ci_retry_bundle_install.sh', 0755
81+
82+
if Rails::VERSION::STRING > '7'
83+
create_file 'app/assets/config/manifest.js'
84+
end
8185
end

0 commit comments

Comments
 (0)