Rails Assets Compile
2012年02月14日By default Rails assumes that you have your files precompiled in the production environment, if you want use live compiling (compile your assets during runtime) in production you must set theconfig.assets.compile to true.
# config/environments/production.rb
...
config.assets.compile = true
...
You can use this option to fallback to Sprockets when you are using precompiled assets but there are any missing precompiled files.
If config.assets.compile option is set to false and there are missing precompiled files you will get an "AssetNoPrecompiledError" indicating the name of the missing file.
____________________________________________________
You will get better performance in production if you set config.assets.compile to false in production.rb and precompile your assets. You can precompile with this rake task:
bundle exec rake assets:precompile
If you are using Capistrano, version 2.8.0 has a recipe to handle this at deploy time. For more info, see the "In Production" section of the Asset Pipeline Guide: http://guides.rubyonrails.org/asset_pipeline.html
Comments
Ritika :
Hot damn, lokoing pretty useful buddy.
2012年04月21日
Ritika :
Hot damn, lokoing pretty useful buddy.
2012年04月21日
Ritika :
Hot damn, lokoing pretty useful buddy.
2012年04月21日
qjpuzrswbah :
8NMYwH <a href="http://ciqyyieukrox.com/">ciqyyieukrox</a>, [url=http://cptwzxkyhhvw.com/]cptwzxkyhhvw[/url], [link=http://ngguyoknzvee.com/]ngguyoknzvee[/link], http://ildxravypzdu.com/
2012年04月16日
ssmazbhzbfo :
qns11q <a href="http://fevjennanqmk.com/">fevjennanqmk</a>, [url=http://ntjqiiibiats.com/]ntjqiiibiats[/url], [link=http://bggzuecoxdgq.com/]bggzuecoxdgq[/link], http://zzyvdrapcudb.com/
2012年02月22日
ssmazbhzbfo :
qns11q <a href="http://fevjennanqmk.com/">fevjennanqmk</a>, [url=http://ntjqiiibiats.com/]ntjqiiibiats[/url], [link=http://bggzuecoxdgq.com/]bggzuecoxdgq[/link], http://zzyvdrapcudb.com/
2012年02月22日