Skip to content

Commit 16e5d15

Browse files
committed
Add railties to the LOAD_PATH if running from a Rails checkout
1 parent 3e24e9e commit 16e5d15

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bin/rails

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env ruby
22

3-
begin
4-
require "rails/cli"
5-
rescue LoadError
3+
if File.exists?(File.join(File.expand_path('../..', __FILE__), '.git'))
64
railties_path = File.expand_path('../../railties/lib', __FILE__)
75
$:.unshift(railties_path)
8-
require "rails/cli"
96
end
7+
require "rails/cli"

0 commit comments

Comments
 (0)