LoginSignup
1
1

More than 5 years have passed since last update.

bower-rails 導入メモ

Last updated at Posted at 2016-04-28

Gemfile

gem "bower-rails"

Install

bundle install

Create Bowerfile

rails g bower:initialize

Bowerfile と bower_rails.rb が作成される

      create  Bowerfile
      create  config/initializers/bower_rails.rb

Bowerfile に使いたいライブラリを記述

asset 'bootstrap'
asset 'fontawesome'

Install

rake bower:install

vendor/assets/bower_components 配下にライブラリが配置される

js,css に記載

application.js
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
//= require_tree .
application.css
/*
 *= require fontawesome
 *= require_tree .
 *= require_self
 */
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1