sutty/bin/spring

12 lines
438 B
Plaintext
Raw Normal View History

2018-01-02 17:19:25 +00:00
#!/usr/bin/env ruby
2019-03-26 15:32:20 +00:00
# frozen_string_literal: true
2020-12-24 18:02:03 +00:00
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
# Load Spring without loading other gems in the Gemfile, for speed.
require "bundler"
Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring|
2018-01-02 17:19:25 +00:00
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
2020-12-24 18:02:03 +00:00
gem "spring", spring.version
require "spring/binstub"
2018-01-02 17:19:25 +00:00
end
end