picardo
picardo

Reputation: 24896

Do I need to use an asset packager with Ruby on Rails?

I am researching asset packager gems for Rails. I found out that Rails has its native solution to this problem in the cache=>"all" option on the include tag helpers. There is also some discussion about whether this is good enough, and some gems like Jammit have their diehard defenders. If there is a native solution to packaging javascript assets, why do we need an asset packager gem?

Upvotes: 1

Views: 418

Answers (1)

tadman
tadman

Reputation: 211660

The native asset packager, which is engaged using the :cache option, only concatenates the JavaScript and CSS files, but doesn't minify them. Other packagers may go further in this regard.

Using the native packager and gzip compression tends to produce results comparable to, yet never superior to, a fully minified packager.

Upvotes: 2

Related Questions