0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

RailsにgemでBootstrapを導入する

Posted at

#はじめに
現在プログラミング学習を始めて3ヶ月目の初学者です。
学んだことをqiitaに投稿という形でアウトプットするため、また備忘録として記事を作成しました。

###1.Gemfileを編集する
gem 'bootstrap', '~> 4.5'

###2.bootstrapファイルを読み込む

app/assets/stylesheetsの「application.css」を「application.scss」に変更

###3.BootstrapをSCSSに読み込ませる

app/assets/stylesheets/application.scss

@import "bootstrap";

###4.application.jsファイルを編集する

app/assets/javascripts/application.js

//= require jquery3
//= require popper
//= require bootstrap-sprockets←追加
//= require rails-ujs
//= require activestorage
//= require turbolinks
//= require_tree .

##最後に
qiitaへの投稿に慣れていないので、分かりづらい上に情報が少ないですが、これから欠かさず投稿していこうと思います。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?