Rails Bootstrap introduced

Introducing Bootstrap

Operating environment

ruby 2.5.1p57 Rails

Introducing Gem

gem 'bootstrap'
gem 'jquery-rails'
bundle install

Rename application.css

mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss

Load with application.scss

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

Added to application.js


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

Start the server

If it was originally started, restart it once.

Recommended Posts

Rails Bootstrap introduced
Introduced Rails6 toastr
Introducing Bootstrap to Rails 5
Introducing Bootstrap to Rails !!
[Rails] Introduced debugging gems'better_errors' and'binding_of_caller'
Introduced graph function with rails
Introducing Bootstrap and Font-Awesome (Rails)
Introduced gRPC client to rails
[Ruby on Rails] Introduced paging function
How to deploy Bootstrap on Rails
[Rails 6] Customize Bootstrap in Rails + Bootstrap 5.0.0-alpha environment
[Rails g.error]
Rails basics
Rails Review 1
Rails API
Rails migration
Introduced jacoco
[Rails] first_or_initialize
rails tutorial
About Rails 6
Introduced Vue.js to an existing Rails app
Rails foundation
Rails memorandum
rails tutorial
rails tutorial
rails tutorial
[Rails] devise
rails tutorial
rails tutorial
Rails Tips
rails method
rails tutorial
How to use credentials.yml.enc introduced in Rails 5.2
Using Material Design for Bootstrap with Rails 5.2
Introduced Vuetify to an existing Rails app
[Rails] ActiveRecord
[Rails] form_with
Rails Review 2
[Rails] Bootstrap form-control does not apply to date_select
[Rails] Implementation of image slide show using Bootstrap 3
[Ruby on Rails] How to install Bootstrap in Rails