Add railties to the LOAD_PATH if running from a Rails checkout

This commit is contained in:
Santiago Pastorino 2011-04-03 19:16:08 -03:00
parent 3e24e9ebc2
commit 16e5d158c2
1 changed files with 2 additions and 4 deletions

View File

@ -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"