Skip to content

Commit

Permalink
Add railties to the LOAD_PATH if running from a Rails checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Apr 3, 2011
1 parent 3e24e9e commit 16e5d15
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions 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"

0 comments on commit 16e5d15

Please sign in to comment.