From 91757615f953d1521b6d6bc8ec5fc1e7a90fa553 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 16 Oct 2024 20:28:40 +0200 Subject: [PATCH] fix: bin/sandbox command Use `bundle exec` to invoke the rails installer, otherwise it will fail with ``` /Users//.rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems.rb:259:in `find_spec_for_exe': can't find gem rails (= 7.2.1.1) with executable rails (Gem::GemNotFoundException) from /Users//.rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems.rb:278:in `activate_bin_path' from /Users//.gem/ruby/3.3.5/bin/rails:25:in `
' ``` although it is installed. --- bin/sandbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sandbox b/bin/sandbox index 11b0a08459..f342e720dc 100755 --- a/bin/sandbox +++ b/bin/sandbox @@ -42,7 +42,7 @@ rm -rf ./sandbox echo "~~~> Creating a pristine Rails app" rails_version=`bundle exec ruby -e'require "rails"; puts Rails.version'` -rails _${rails_version}_ new sandbox \ +bundle exec rails _${rails_version}_ new sandbox \ --database="$RAILSDB" \ --skip-git \ --skip-keeps \