I used script/server -e production
to start rails in production mode. It did and I got no errors. However how do I tell if it is in production mode? I tried a non-existent route, and I got a similar error page I did in development.
I thought if under production model, I get the 404 error page that is in my /public folder.
Does it mean it didn't start in production mode?
Thanks for your help.
If its Rails 3.1+, Rails.env.production?
will return true
when in production.
Rails.env.production? #=> true
Rails.env.staging? #=> false
Rails.env.development? #=> false