Due to the ever approaching holidays, I haven’t had the time to implement this in my project as of yet. But I’ve added it to my weekend to-do list, and decided to select it as my pick for this week.
There are quite a few helpful resources to get Bower up and running in our application. One way to manage dependencies with Bower in our Rails application is to use a version of Sprockets which allows our manifest files (remember application.js and application.css from yesterday?) to require packages definde by Bower. The first answer to a StackOverflow question about this topic mentions that the bower defined packages feature was added in Sprockets 2.6, which Rails 3.x won’t allow us to bundle due to a version restriction. So we can get this feature working in our Rails 3.x apps by adding
gem 'sprockets', '2.2.2.backport1' to our Gemfile and then typing
bundle exec install in our terminal. This StackOverlow answer goes on to say that our bundling this sprockets backport into our dependencies will make Sprokets to start looking for our assets in
- Aidan Feldman wrote a gist guide soon to be a gem that covers both Rails3.2 and Rails 4.0 on Ruby 2.0.0. You can take a peak at his guide here.
- I’m looking forward to implementing Bower in my rails application over the weekend, here are a few guides I’ll be looking a little deeper into.
- How to manage front-end packages in Rails with Bower By: Shelly Cloud
- Better Component Packaging for Rails’ Asset Pipeline By: Kaeff
- Bower, an assets package manager By: Synbioz
- And this neat looking proxy between Bundler and Bower.
- Bower and Rails. Friends forever By: Coder Wall
- Bower and Rails 4 By: Iconoclast Labs
I hope you all have a great weekend.
Categories: Ruby on rails