Skip to content

Commit

Permalink
fix: bin/sandbox command
Browse files Browse the repository at this point in the history
Use `bundle exec` to invoke the rails installer,
otherwise it will fail with

```
/Users/<user>/.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/<user>/.rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems.rb:278:in `activate_bin_path'
	from /Users/<user>/.gem/ruby/3.3.5/bin/rails:25:in `<main>'
```

although it is installed.
  • Loading branch information
tvdeyen committed Oct 16, 2024
1 parent c3fea3e commit 9175761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 9175761

Please sign in to comment.