mirror of https://github.com/rails/rails
Add railties to the LOAD_PATH if running from a Rails checkout
This commit is contained in:
parent
3e24e9ebc2
commit
16e5d158c2
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue