Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use the correct APP_PATH based on whether application.rb exists

  • Loading branch information...
commit b3ef03db39531e95091a03025b659aa434f675aa 1 parent 652c28a
@wycats authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 commands/server.rb
View
4 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"
Please sign in to comment.
Something went wrong with that request. Please try again.