Rails Assets

Updated . Posted . Visible to the public.

Automatically builds gems from Bower packages (currently 1700 gems available). Packaged Javascript files are then automatically available in your asset pipeline manifests.

Why we're not using it

At makandra we made a choice to use bower-rails instead. While we believe Rubygems/Bundler to be superior to Javascript package managers, we wanted to use something with enough community momentum behind it that it won't go away in 10 years.

Mixing Rails Assets with other Javascript sources

Note that you can get into trouble when you mix Rails Assets with other ways of obtaining Javascript. E. g. if you install jasmine-rails (through Rubygems) it will provide the Jasmine library to your asset pipeline.

When you then install rails-assets-jasmine-fixture through Rails Assets you will get another (possibly conflicting) copy of Jasmine installed through Rails Assets. This is because rails-assets-jasmine-fixture depends on rails-assets-jasmine and does not realize that the Jasmine dependency was already satisfied through jasmine-rails.

Last edit
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted to makandra dev (2014-07-02 13:25)