Skip to content

Commit db6b0e1

Browse files
committed
update bin files for rails 6.1.7
1 parent ff4c1c1 commit db6b0e1

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

bin/rails

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
load File.expand_path("spring", __dir__)
23
APP_PATH = File.expand_path('../config/application', __dir__)
3-
require_relative '../config/boot'
4-
require 'rails/commands'
4+
require_relative "../config/boot"
5+
require "rails/commands"

bin/rake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2-
require_relative '../config/boot'
3-
require 'rake'
2+
load File.expand_path("spring", __dir__)
3+
require_relative "../config/boot"
4+
require "rake"
45
Rake.application.run

bin/setup

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env ruby
2-
require 'fileutils'
2+
require "fileutils"
33

44
# path to your application root.
55
APP_ROOT = File.expand_path('..', __dir__)
@@ -9,8 +9,8 @@ def system!(*args)
99
end
1010

1111
FileUtils.chdir APP_ROOT do
12-
# This script is a way to setup or update your development environment automatically.
13-
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
12+
# This script is a way to set up or update your development environment automatically.
13+
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
1414
# Add necessary setup steps to this file.
1515

1616
puts '== Installing dependencies =='

bin/spring

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
3+
gem "bundler"
4+
require "bundler"
5+
6+
# Load Spring without loading other gems in the Gemfile, for speed.
7+
Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring|
8+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
9+
gem "spring", spring.version
10+
require "spring/binstub"
11+
rescue Gem::LoadError
12+
# Ignore when Spring is not installed.
13+
end
14+
end

0 commit comments

Comments
 (0)