aboutsummaryrefslogtreecommitdiffstats
path: root/railties/bin
diff options
context:
space:
mode:
authorbuddhamagnet <buddhamagnet@gmail.com>2013-04-21 23:30:16 +0100
committerbuddhamagnet <buddhamagnet@gmail.com>2013-04-21 23:30:16 +0100
commita85729c5f17f815d02274139431217c6ee3e599a (patch)
tree4b45099258d0e3b62ee80e39b77533fedb106ddb /railties/bin
parent6b3979d93b4f3cf7c58395d0920b50dbf900e4e3 (diff)
downloadrails-a85729c5f17f815d02274139431217c6ee3e599a.tar.gz
rails-a85729c5f17f815d02274139431217c6ee3e599a.tar.bz2
rails-a85729c5f17f815d02274139431217c6ee3e599a.zip
extract path into variable
Diffstat (limited to 'railties/bin')
-rwxr-xr-xrailties/bin/rails4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/bin/rails b/railties/bin/rails
index a1c4faaa73..b3026e8a93 100755
--- a/railties/bin/rails
+++ b/railties/bin/rails
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
-if File.exists?(File.join(File.expand_path('../../..', __FILE__), '.git'))
+git_path = File.join(File.expand_path('../../..', __FILE__), '.git')
+
+if File.exists?(git_path)
railties_path = File.expand_path('../../lib', __FILE__)
$:.unshift(railties_path)
end