Turbo Sprockets Rails3

Speeds up your Rails 3 assets:precompile by only recompiling changed files, and only compiling once to generate all assets
Alternatives To Turbo Sprockets Rails3
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
17 hours ago1January 03, 2021810otherRuby
Open-source customer engagement suite, an alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
224a month ago100January 13, 202335mitRuby
A Rails template with our standard defaults, ready to deploy to Heroku.
111 days ago34March 17, 201282mitLess
A self hosted Web publishing platform on Rails.
Rails Template1,042
a month ago1mitRuby
App template for Rails 7 projects; best practices for TDD, security, deployment, and developer productivity. Now with optional Vite integration! ⚡️
Turbo Sprockets Rails398679929 years ago47August 05, 201440mitRuby
Speeds up your Rails 3 assets:precompile by only recompiling changed files, and only compiling once to generate all assets
Ember Cli Rails720
2427 months ago73August 26, 202054mitRuby
Unify your EmberCLI and Rails Workflows
5 months ago25mitJavaScript
:money_with_wings: A simple self-hosted budgeting app
Letter_opener_web5632,78672 years ago29November 06, 20211mitHTML
A web interface for browsing Ruby on Rails sent emails
87 months ago10February 09, 202013mitRuby
Create a fully featured real estate website on Rails in minutes! ⛺
5 years ago10mitRuby
A free open source platform for selling digital downloads such as ebooks
Alternatives To Turbo Sprockets Rails3
Select To Compare

Alternative Project Comparisons

Turbo Sprockets for Rails 3.2.x

Build Status

  • Speeds up your Rails 3 rake assets:precompile by only recompiling changed assets, based on a hash of their source files
  • Only compiles once to generate both fingerprinted and non-fingerprinted assets


turbo-sprockets-rails3 can now be considered relatively stable. A lot of compatibility issues and bugs have been solved, so you shouldn't run into any problems. However, please do test it out on your local machine before deploying to a production site, and open an issue on GitHub if you have any problems. By using this software you agree to the terms and conditions in the MIT license.


Just drop the gem in your Gemfile, under the :assets group:

group :assets do
  gem 'turbo-sprockets-rails3'

Run bundle to install the gem, and you're done!

Test it out by running rake assets:precompile. When it's finished, you should see a new file at public/assets/sources_manifest.yml, which includes the source fingerprints for your assets.

Go on, run rake assets:precompile again, and it should be a whole lot faster than before.

Enjoy your lightning fast deploys!

Removing Expired Assets

turbo-sprockets-rails3 provides a Rake task called assets:clean_expired. You can run this task after assets:precompile to remove outdated assets.

If you use this rake task, you must set config.assets.handle_expiration to true in config/environments/production.rb. This makes sure that asset modification times are updated properly before assets:precompile, so that the clean_expired task knows which assets are safe to remove.

An asset will be deleted if it is no longer referenced by manifest.yml, and hasn't been actively deployed for more than a day (default).

You can configure the expiry time by setting config.assets.expire_after in config/environments/production.rb. An expiry time of 2 weeks could be configured with the following code:

config.assets.expire_after = 2.weeks


The gem needs to support multiple changes to Rails and sprockets, so the following versioning is used:

  • Rails 3.2.0 to 3.2.8 uses turbo-sprockets-rails3 0.2.x
  • Rails 3.2.9 and higher uses turbo-sprockets-rails3 0.3.x



Fully compatible.


Fully compatible starting from version 0.8.0.

gem 'wicked_pdf', '>= 0.8.0'

Please let me know if you have any problems with other gems, and I will either fix it, or make a note of the problem here.



turbo-sprockets-rails3 should work out of the box with the latest version of Capistrano.

Issue with Capistrano 2: Since the default behavior of Capistrano consists of creating "releases" every time a deploy occurs, one strategy might be to create a "shared assets" folder. You could create a symlink to the shared assets folder, every time you deploy.


load 'deploy/assets'

or in your Capistrano precompile task:

run "ln -s #{shared_path}/assets #{release_path}/public/assets"
run "cd #{current_path} && bundle exec rake assets:precompile RAILS_ENV=#{rails_env}"


I've created a Heroku Buildpack for turbo-sprockets-rails3 that keeps your assets cached between deploys, so you only need to recompile changed assets. It will automatically expire old assets that are no longer referenced by manifest.yml after 7 days, so your public/assets folder won't grow out of control.

To create a new application on Heroku using this buildpack, you can run:

heroku create --buildpack https://github.com/ndbroadbent/heroku-buildpack-turbo-sprockets.git

To add the buildpack to an existing app, you can run:

heroku config:add BUILDPACK_URL=https://github.com/ndbroadbent/heroku-buildpack-turbo-sprockets.git

Compiling Assets on Your Local Machine

You can also compile assets on your local machine, and commit the compiled assets. You might want to do this if your local machine is a lot faster than the Heroku VM, or if you also want to generate other files, such as static pages. When you push compiled assets to Heroku, it will automatically skip the assets:precompile task.

I've automated this process in a Rake task for my own projects. The task creates a deployment repo at tmp/heroku_deploy so that you can keep working while deploying, and it also rebases and amends the assets commit to keep your repo's history from growing out of control. You can find the deploy task in a gist at https://gist.github.com/3802355. Save this file to lib/tasks/deploy.rake, and make sure you have added a heroku remote to your repo. You will now be able to run rake deploy to deploy your app to Heroku.


If you would like to view debugging information in your terminal during the assets:precompile task, add the following lines to the bottom of config/environments/production.rb:

config.log_level = :debug
config.logger = Logger.new(STDOUT)
Popular Ruby On Rails Projects
Popular Heroku Projects
Popular Frameworks Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Ruby On Rails