2018-05-23 10:32:04 +02:00
|
|
|
#!/usr/bin/env ruby
|
2022-02-13 10:25:06 +01:00
|
|
|
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
|
|
|
|
gem "bundler"
|
|
|
|
require "bundler"
|
2018-05-23 10:32:04 +02:00
|
|
|
|
2022-02-13 10:25:06 +01:00
|
|
|
# Load Spring without loading other gems in the Gemfile, for speed.
|
|
|
|
Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring|
|
2018-05-23 10:32:04 +02:00
|
|
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
2022-02-13 10:25:06 +01:00
|
|
|
gem "spring", spring.version
|
|
|
|
require "spring/binstub"
|
|
|
|
rescue Gem::LoadError
|
|
|
|
# Ignore when Spring is not installed.
|
2018-05-23 10:32:04 +02:00
|
|
|
end
|
|
|
|
end
|