bin/spring
#!/usr/bin/env ruby
# frozen_string_literal: true
if !defined?(Spring) && [nil, 'development', 'test'].include?(ENV.fetch('RAILS_ENV', nil))
gem 'bundler'
require 'bundler'
# Load Spring without loading other gems in the Gemfile, for speed.
Bundler.locked_gems&.specs&.find { |spec| spec.name == 'spring' }&.tap do |spring|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
gem 'spring', spring.version
require 'spring/binstub'
rescue Gem::LoadError
# Ignore when Spring is not installed.
end
end