12
9

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 App] Bootstrapの開発環境を自動的に作る (bootstrap-generators)

Last updated at Posted at 2015-05-26

>>> デモサイトはこちらです <<<

参考
bootstrap-generators

この記事は早くBootstrapの開発環境を作る方法をご紹介させていただきます。

Gemfile
gem 'bootstrap-sass'

group :development do
  gem 'bootstrap-generators'
end

Bootstrapをインストール

rails g bootstrap:install [オプション]

オプション

-e=erb/haml/slim デフォルトは「ERB」
-se=css/scss/less デフォルトは「SCSS」

ERB以外の場合、views/layouts/application.html.erbを削除してください。

テストの為にScaffoldを作ります
rails g scaffold Article title content:text && rake db:migrate

そして、アプリを実行するとこのようになります。
スクリーンショット 2016-12-17 23.52.41.png

12
9
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
12
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?