LoginSignup
1
2

More than 5 years have passed since last update.

railsでbootstrap-sassを導入する手順

Posted at

はじめに

railsでbootstrapを使う際の手順についてまとめました。
今回はscssを使用するのでbootstrap-sassを使用します。

①gemをinstall

Gemfile
gem 'bootstrap-sass'
gem 'jquery-rails'

追加後、bundle install

②application.jsに以下を追加

application.js
//= require jquery
//= require jquery_ujs

//= require_tree .より上に追加する。

③application.scssに変更

application.scss

application.scss
に名称変更

④application.scssに以下を追加

application.scss
@import "bootstrap";
@import "bootstrap-sprockets";
1
2
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
2