# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)

if defined? PhusionPassenger
  run Shreds::Application
else
  ENV["RAILS_RELATIVE_URL_ROOT"] ||= "/"

  map ENV["RAILS_RELATIVE_URL_ROOT"] do
    run Shreds::Application
  end
end

# This file is used by Rack-based servers to start the application.
ENV["RAILS_RELATIVE_URL_ROOT"] ||= "/"

require ::File.expand_path('../config/environment', __FILE__)

if defined? PhusionPassenger
  run Shreds::Application
else
  map ENV["RAILS_RELATIVE_URL_ROOT"] do
    run Shreds::Application
  end
end

Move env assignment out, so rails wont detect it as nil at boot
Move env assignment out, so rails wont detect it as nil at boot
