From cb1aaba14b3ccd6d0b2eafcb53486bdef3a131c5 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Wed, 13 Dec 2023 17:57:41 +0100 Subject: [PATCH] Generate the sandbox using the version of Rails coming from the Gemfile --- bin/sandbox | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/sandbox b/bin/sandbox index 86878c6440b..15d23f35950 100755 --- a/bin/sandbox +++ b/bin/sandbox @@ -41,7 +41,8 @@ echo "~~~> Removing the old sandbox" rm -rf ./sandbox echo "~~~> Creating a pristine Rails app" -rails new sandbox \ +rails_version=`bundle exec ruby -e'require "rails"; puts Rails.version'` +rails _${rails_version}_ new sandbox \ --database="$RAILSDB" \ --skip-git \ --skip-keeps \