Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the filesystem will be different but this guide will get you working with it while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
I had issues with sprockets (2.0.0.beta.13)
because the paths
array was being duplicated and returned, so adding things to it did nothing.
Instead use:
append_path 'javascripts'
append_path 'stylesheets'
in the AssetServer class.
I have also created a simple example Rails 3 app at:
https://github.com/suranyami/sprocket_sample