Skip to content

Commit

Permalink
Updated rails´s guides on the config.serve_static_assets and it´s set…
Browse files Browse the repository at this point in the history
…tings in production mode using WEBrick. This documentation has it´s roots in #issue1657. You have to set config.serve_static_assets to true in production mode with WEBrick as only this includes ActionDispatch::Static.
  • Loading branch information
TomTriple committed Jun 15, 2011
1 parent 28508d5 commit 6d96535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/guides/source/configuring.textile
Expand Up @@ -98,7 +98,7 @@ NOTE. The +config.asset_path+ configuration is ignored if the asset pipeline is

* +config.secret_token+ used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get +config.secret_token+ initialized to a random key in +config/initializers/secret_token.rb+.

* +config.serve_static_assets+ configures Rails to serve static assets. Defaults to true, but in the production environment is turned off. The server software used to run the application should be used to serve the assets instead.
* +config.serve_static_assets+ configures Rails itself to serve static assets. Defaults to true, but in the production environment is turned off as the server software (e.g. Nginx or Apache) used to run the application should serve static assets instead. Unlike the default setting set this to true when running (absolutely not recommended!) or testing your app in production mode using WEBrick. Otherwise you won´t be able use page caching and requests for files that exist regularly under the public directory will anyway hit your Rails app.

* +config.session_store+ is usually set up in +config/initializers/session_store.rb+ and specifies what class to use to store the session. Possible values are +:cookie_store+ which is the default, +:mem_cache_store+, and +:disabled+. The last one tells Rails not to deal with sessions. Custom session stores can also be specified:

Expand Down

0 comments on commit 6d96535

Please sign in to comment.