Install bower on the system (required by bower-rails gem)
npm install -g bower
Add Bower to the Gemfile
gem 'bower-rails'
Install the gem
bundle install
In Bowerfile add the packages to be installed.
asset: 'angular'
asset 'angular-ui-router'
# vim: ft=ruby
Packages could be found here
Or searched for by
bower search <query>
For more check this documentation
When done install the packages using
rake bower:install
We'll need to require the js files in application.js to be accessible through the application.
in application.js add
//= require angular/angular
//= require angular-ui-router
Now we can use the installed packages (angular and angular-ui-router) in the javascript/coffeescript files in our assets And consume them directly in our html files.