Permalink
Browse files

Add railties to the LOAD_PATH if running from a Rails checkout

  • Loading branch information...
1 parent 3e24e9e commit 16e5d158c23af1c7ca2c7aa32d964db97cb9a4f7 @spastorino spastorino committed Apr 3, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 bin/rails
View
@@ -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.