LoginSignup
1
4

More than 5 years have passed since last update.

bootstrapの導入(gem)

Last updated at Posted at 2018-04-11

bootstrap

1,gemに記述する

Gemfile
  gem 'bootstrap-sass'
  gem 'jquery-rails'
$ bundle inatall

2,ファイル名(拡張子)を変更する

$ cd app/assets/stylesheets
$ rename application.css application.scss

*直接の変更でも可能

3,二つのファイルに記述を追加

app/assets/stylesheets/application.scss
*= require_tree .
    *= require_self
    */
    @import "bootstrap-sprockets";  /*ここを追加*/
    @import "bootstrap";            /*ここを追加*/

app/assets/javascripts/application.js
//= require rails-ujs
  //= require turbolinks
  //= require jquery
  //= require bootstrap-sprockets
  //= require_tree .

 リンク

Bootstrap日本語リファレンス

1
4
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
4