Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>A rails app can be run in production calling <code>rails server -e production</code>, although 99% of the time you'll be serving on something like passenger or thin instead of WEBrick, which means there's a different command to start the server. (<code>thin start -e production</code> for instance)</p> <p>This is a complicated question, but the best place to start learning about the differences would be to look at the specific <code>environment.rb</code> files. When rails boots up it starts with the environment file that matches the called environment, ie if you start it in development it begins by loading your <code>development.rb</code> file, or if you're in production it will load the <code>production.rb</code> file. The differences in environments are mostly the result of these differences in the various environment config files.</p> <p>Basically if a Rails 3.1 app is in production mode, then by default it is not going to be compiling assets on the fly, and a lot of caching will be going on that isn't happening in development. Also, when you get error messages they will be logged but not rendered to the user, instead the static error page from your public directory will be used.</p> <p>To get more insight into this, I would suggest reading the relevant rails guides:</p> <p>Rails Initialization Guide: <a href="http://guides.rubyonrails.org/initialization.html">http://guides.rubyonrails.org/initialization.html</a></p> <p>Rails Configuration Guide: <a href="http://guides.rubyonrails.org/configuring.html">http://guides.rubyonrails.org/configuring.html</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload