summaryrefslogtreecommitdiff
path: root/bin/rails
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rails')
-rwxr-xr-xbin/rails31
1 files changed, 3 insertions, 28 deletions
diff --git a/bin/rails b/bin/rails
index 7fd59cc7..5191e692 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,29 +1,4 @@
1#!/usr/bin/env ruby 1#!/usr/bin/env ruby
2# frozen_string_literal: true 2APP_PATH = File.expand_path('../../config/application', __FILE__)
3 3require_relative '../config/boot'
4# 4require 'rails/commands'
5# This file was generated by Bundler.
6#
7# The application 'rails' is installed as part of a gem, and
8# this file is here to facilitate running it.
9#
10
11require "pathname"
12ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13 Pathname.new(__FILE__).realpath)
14
15bundle_binstub = File.expand_path("../bundle", __FILE__)
16
17if File.file?(bundle_binstub)
18 if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19 load(bundle_binstub)
20 else
21 abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23 end
24end
25
26require "rubygems"
27require "bundler/setup"
28
29load Gem.bin_path("railties", "rails")