LoadError by requiring a gem with :path or :git
You'll have to load the bundler environment before running the test.rb
bundle exec ruby test.rb
You can run with the bundler environment via:
bundle exec ruby script.rb
Or require bundler setup in your script before the gem(s) that are causing the issue.
require 'bundler/setup'
Most links I found out there about this pointed to documentation on Bundler's site, but most all of the links are dead now unfortunately.