Skip to content

Asset Management with Bower

Saumya Kanoria edited this page Apr 28, 2016 · 2 revisions

Normally, Rails does asset management from within the (/app|lib|vendor)/assets folders. However, because we are supporting very 'front-end heavy' applications, we use Bower, a very widely used tool for this purpose, via the bower-rails gem.

To add/remove front-end libraries, add-to/remove-from the /bower.json file the required library or libraries. Then run:

$ rake bower:install

Also remember to reference/de-reference the relevant files in:

  • /app/assets/javascripts/(client|admin)/application.js
  • /app/assets/stylesheets/(client|admin)/application.css

Clone this wiki locally