Read more

Rails Assets

Thomas Klemm
July 02, 2014Software engineer

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

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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.

Posted by Thomas Klemm to makandra dev (2014-07-02 15:25)