Add bower to rails project

Install bower using npm

npm install -g bower

Create .bowerrc file at root of your rails app to set the path to your component.

touch .bowerrc
  "directory": "vendor/assets/components"



Init bower
File bower.json will be create depend on your answers.

bower init

It should looks like:

  "name": "project name",
  "ignore": [
  "dependencies": {
    "bootstrap-fileinput": "latest"     # Add libraries that you need here.
  "private": true

Find more library at
Install your libraries

bower install


config.assets.paths << Rails.root.join('vendor', 'assets', 'components')

Don't forget require .js and .css files in application.css and application.js