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:
parent
4a892c32f9
commit
a7f0011511
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user