2
2

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 5 years have passed since last update.

RailsアプリにBootstrapを適用させる

Last updated at Posted at 2014-11-26

対象となるGemfileに以下を追記する。

gem 'bootstrap-sass', '~> 3.3.1'

gemfile ...

gem 'bootstrap-sass', '~> 2.3.1.0'

...

追記し終わったらgemの更新
$ bundle install

次にmain.css.sassに@import "bootstrap";を追加する。

app/assets/stylesheets/main.css.sass

// Place all the styles related to the Main controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

@import "bootstrap";

application.jsにrequire Bootstrapを追加

app/assets/javascripts/application.js

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require angular

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?