Fix sandbox command for Rails 8

Rails 8 does not create a sprockets manifest anymore,
but we still depend on it. Since rails commands do not
work anymore, because sprockets raises an error if no
manifest.js file is present we need to create it in
order to be able to run rails new
This commit is contained in:
Thomas von Deyen 2025-02-18 15:54:41 +01:00
parent 4a892c32f9
commit a7f0011511
No known key found for this signature in database
GPG Key ID: 7FEE45A164D48B7B

View File

@ -40,6 +40,13 @@ function unbundled {
echo "~~~> Removing the old sandbox"
rm -rf ./sandbox
mkdir -p sandbox/app/assets/config
cat <<MANIFEST > sandbox/app/assets/config/manifest.js
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
MANIFEST
echo "~~~> Creating a pristine Rails app"
rails_version=`bundle exec ruby -e'require "rails"; puts Rails.version'`
bundle exec rails _${rails_version}_ new sandbox \