2013-03-04 15:06:46 -06:00
|
|
|
# Check that the app is configured correctly. Raise some helpful errors if something is wrong.
|
|
|
|
|
2013-03-04 18:42:44 -06:00
|
|
|
if Rails.env.production? && ['localhost', 'production.localhost'].include?(Discourse.current_hostname)
|
2013-03-04 15:06:46 -06:00
|
|
|
puts <<END
|
|
|
|
|
|
|
|
Discourse.current_hostname = '#{Discourse.current_hostname}'
|
|
|
|
|
|
|
|
Please update the host_names property in config/database.yml
|
2013-03-04 18:42:44 -06:00
|
|
|
so that it uses the hostname of your site. Otherwise you will
|
2013-03-04 15:06:46 -06:00
|
|
|
experience problems, like links in emails using #{Discourse.current_hostname}.
|
|
|
|
|
|
|
|
END
|
|
|
|
|
|
|
|
raise "Invalid host_names in database.yml"
|
|
|
|
end
|