Document (current) recommended usage of turbosprockets-rails-3 in README #118

davidjrice opened this Issue Oct 25, 2012 · 2 comments

2 participants


Regarding issue #110, turbosprockets is compatible out of the box.


Let's document in README that it is currently recommended (prior to Rails 4)


@nbroadbent So, do you think turbosprockets-rails-3 approach will be in Rails 4?

Should that perhaps be the recommended approach?
Until when?

I wonder, if it would be possible to use the development version of sprockets-rails for rails 4 with rails 3 apps at some point when these changes are implemented!


It looks like sprockets and sprockets-rails are heading in a different direction, with the main thing being the removal of non-digest assets. That means that the underlying caching mechanism only has to deal with digest assets, even during development. The cache can also be shared across deploys, so theoretically it won't need to recompile unchanged assets. I had my doubts about support for edge cases like sass and less with their @import directives, but it looks like sprockets can also delegate caching down to those gems, so that seems promising.

Also, Josh Peek has been working on a source maps feature for sprockets, which builds out the list of asset dependencies. That's useful for many things, including debugging, but especially for detecting asset changes. When that feature is merged in, we can use modification times to check all dependencies, instead of relying on a digest of sources. So, that will be a lot better :)

So, I would like to recommend the use of turbo-sprockets-rails3 for 3.2.x, since it doesn't look like any asset changes will make it into the next 3.2 releases.

Using sprockets-rails with rails 3 would be a bit of a nightmare, since it was extracted especially for Rails 4, and contains a lot of Rails 4 specific code and dependencies. That was my initial idea before I gave up and made the gem :)
Also keep in mind that 1.8.7 is no longer supported with Rails 4, so that would mean that users would be forced to upgrade to 1.9.3 (Not a bad thing, but some people might not want to deal with that right now.)

So I think it's best to just use turbo-sprockets-rails3 with Rails 3, and wait to use the new assets stuff in Rails 4.

@davidjrice davidjrice closed this Jan 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment