From b3ef03db39531e95091a03025b659aa434f675aa Mon Sep 17 00:00:00 2001 From: wycats Date: Wed, 4 Aug 2010 01:06:45 -0700 Subject: [PATCH] Use the correct APP_PATH based on whether application.rb exists --- commands/server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/server.rb b/commands/server.rb index e2abc36..05f3614 100644 --- a/commands/server.rb +++ b/commands/server.rb @@ -1,6 +1,6 @@ ARGV.unshift "server" -APP_PATH = File.expand_path("../../../../config/environment.rb", __FILE__) -$".push File.expand_path("../boot.rb", APP_PATH) +root = File.expand_path("../../../../config", __FILE__) +APP_PATH = File.exist?("#{root}/application.rb") ? "#{root}/application.rb" : "#{root}/environment.rb" require "rails/commands"