We recently suffered from asset pipeline performance issues. In order to boost deploying, we decide to switch to capistrano-local-precompile strategy.
However, local asset compiling in Rails 4 is blazing fast, but in Rails 3 is not.
And much nightmare is if we can skip compiling prcoess if assets weren't changed when we compiling at remote, but we need to compile asset everytime if we choose to compile locally.
So we comes out this crazy idea: How about running Rails 4 asset pipeline in Rails 3 project.
Here is how:
1. modify Gemfile
2. edit config/enviorments/production.rb
3. change config/deploy.rb
You should install
capistrano-local-precompile first, and override precompile command. It's d because the precompile machism in different versions are different.
Behinde the scene
Basically we are doing serveral things:
sprockets-railsedge running with
sass-railsedge running under rails 3
compass-railsedge running with rails 4 strategy
to resolve asset_paths, SASS resolver issue...etc.
Before doing this, make sure you really understand what your are doing. And it exists many different between sprockets 1 & 2.