aboutsummaryrefslogtreecommitdiffstats
path: root/bin/rails
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rails')
-rwxr-xr-xbin/rails6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/rails b/bin/rails
index a628cc35ca..f9725d78d0 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,9 +1,7 @@
#!/usr/bin/env ruby
-begin
- require "rails/cli"
-rescue LoadError
+if File.exists?(File.join(File.expand_path('../..', __FILE__), '.git'))
railties_path = File.expand_path('../../railties/lib', __FILE__)
$:.unshift(railties_path)
- require "rails/cli"
end
+require "rails/cli"