LoginSignup
1
2

More than 3 years have passed since last update.

bootstrapの導入方法

Posted at

bootstrapってなに?

RubyのフレームワークはRuby on Railsで言うところの、
boootstrapとはCSSのフレームワークみたいなものです。

bootstrapを学べば、効率的にビューを実装できるので知っておいて損はないです。。

導入方法

1.Gemfileに以下を記述する。


gem "sass-rails","~>5.0"
gem "bootstrap-sass","~>3.3.6"
gem "jquery-rails"
gem "jquery-ui-rails"

2.bundle updateする

 $ bundle update

3.appcation.cssを.scssに拡張してから下記を記述する。

 @import "bootstrap-sprockets";
 @import "bootstrap";

4.appcation.jsの中に下記を記述。

//= require jquery //= require~と書いてる部分の一番上に記述
//= require bootstrap-sprockets //= require~と書いてる部分の一番下に記述

以上

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