At this point, Rails should seem much less mysterious. You should understand how to build fairly sophisticated Rails applications, the magic of assembling applications by naming convention. As much as you’ve learned, though, there’s much further that you could go.
So far, you’ve likely been running all of your code in development or testing
mode. Shifting to production mode is kind of like graduating. Running your
application in production mode means that it runs all of its queries
against your production database, and that it loads Rails’ configuration
from config/environments/production.rb. You also should precompile your assets with
bundle exec rake
assets:precompile, as the production environment won’t do that
automatically. (You can set Rails up to do that, but it will likely create
The way Rails is set up by default, the shift in environments to production mode results in changes to the following configuration settings:
Rails doesn’t check to see if any code has changed every request, so everything runs a lot faster in production mode.
Caching is enabled, letting Rails optimize its performance by minimizing redundant processing.
Verbose error reporting is disabled, so Rails won’t confess all to total strangers. Only users coming in from localhost (on the same ...