aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRichard Hulse <richard.hulse@radionz.co.nz>2011-07-13 21:20:53 +1200
committerRichard Hulse <richard.hulse@radionz.co.nz>2011-07-13 21:20:53 +1200
commit5dcebd7e3803c34b7e1aa1ed3577c9851dbee4a4 (patch)
treec5396b41bf331ad0c2c4bcbf1a3ec9c2fcd68afe /railties
parent991678c1df4206f108ffd107a0c98420e2fbbbce (diff)
downloadrails-5dcebd7e3803c34b7e1aa1ed3577c9851dbee4a4.tar.gz
rails-5dcebd7e3803c34b7e1aa1ed3577c9851dbee4a4.tar.bz2
rails-5dcebd7e3803c34b7e1aa1ed3577c9851dbee4a4.zip
[asset pipeline] add capistrano task
Task still needs to symlink default rails default filestore location, but code may still be settling
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/asset_pipeline.textile16
1 files changed, 15 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 1cefe29e5e..640d02f6c1 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -261,7 +261,21 @@ The rake task is:
rake assets:precompile
</erb>
-TODO: explain where to use this with Capistrano
+You can run this as part of a Capistrano deployment:
+
+<erb>
+before "deploy:symlink", "deploy:precompile_assets"
+
+desc "Compile pipeline assets"
+task :precompile_assets do
+ run "#{release_path}; RAILS_ENV=#{rails_env} bundle exec rake assets:precompile"
+end
+</erb>
+
+If you are not precompiling your assets, and you are using the default cache file store (which is the filesystem), you will need to symlink +rails_root/tmp/cache/assets+ from the shared folder that is part of the Capistrano deployment structure. This is so the cached file persist between deployments.
+
+TODO: Extend above task to allow for this and add task to set it up (See commits 8f0e0b6 and 704ee0df).
+
The default matcher for compiling files is rather broad: