File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Check that the app is configured correctly. Raise some helpful errors if something is wrong.
22
3- if Rails . env . production? && [ 'localhost' , 'production.localhost' ] . include? ( Discourse . current_hostname )
4- puts <<END
3+ if defined? ( Rails ::Server ) and Rails . env . production? # Only run these checks when starting up a production server
54
6- Discourse.current_hostname = '#{ Discourse . current_hostname } '
5+ if [ 'localhost' , 'production.localhost' ] . include? ( Discourse . current_hostname )
6+ puts <<END
77
8- Please update the host_names property in config/database.yml
9- so that it uses the hostname of your site. Otherwise you will
10- experience problems, like links in emails using #{ Discourse . current_hostname } .
8+ Discourse.current_hostname = '#{ Discourse . current_hostname } '
9+
10+ Please update the host_names property in config/database.yml
11+ so that it uses the hostname of your site. Otherwise you will
12+ experience problems, like links in emails using #{ Discourse . current_hostname } .
13+
14+ END
15+
16+ raise "Invalid host_names in database.yml"
17+ end
18+
19+ if !Dir . glob ( File . join ( Rails . root , 'public' , 'assets' , 'application*.js' ) ) . present?
20+ puts <<END
21+
22+ Assets have not been precompiled. Please run the following command
23+ before starting the rails server in production mode:
24+
25+ rake assets:precompile
1126
1227END
1328
14- raise "Invalid host_names in database.yml"
29+ raise "Assets have not been precompiled"
30+ end
1531end
You can’t perform that action at this time.
0 commit comments