It automatically converts the packaged components into gems that are easily droppable into your asset pipeline and stay up to date.
*It works with Sinatra too! See the demo.
First, make sure you use bundler >= 1.8.4
https://rails-assets.org as a new gem source, then reference any Bower components that you need as gems in the following convention:
source 'https://rails-assets.org' do gem 'rails-assets-BOWER_PACKAGE_NAME' end
install, if Bundler requests a package like this, Rails Assets’ daemon automatically will:
Dependencies are handled the same way recursively.
Gemfile source 'https://rubygems.org' +gem 'bundler', '>= 1.8.4' gem 'rails' gem 'sass-rails' gem 'uglifier' gem 'coffee-rails' +source 'https://rails-assets.org' do + gem 'rails-assets-bootstrap' + gem 'rails-assets-angular' + gem 'rails-assets-leaflet' +end
You can now
bower.json will be automatically included.
Gems created by Rails Assets work great with any Sprockets-based application.
application.js //= require_self +//= require bootstrap +//= require angular +//= require leaflet //= require_tree . //= require_tree shared
application.css /* *= require_self + *= require bootstrap + *= require leaflet *= require_tree . *= require_tree shared */