Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
45
Help us understand the problem. What is going on with this article?
@LuckOfWise

twitter-bootstrap-rails ことはじめ

More than 5 years have passed since last update.

twitter-bootstrap-railsをさらっと触って社内メンバーに説明したときのメモ

・プロジェクト作成

rails new tbsample -T

cd tbsampl  

・インストール

Gemfile編集

Gemfile
  gem "twitter-bootstrap-rails"
bundle install

rails g bootstrap:install

・sample

rails g bootstrap:layout application fixed
rails g scaffold Post title:string description:text
rake db:migrate
rails g bootstrap:themed Posts

・注意点

layoutにtwitter-bootstrapを反映するとfavicon_link_tagが挿入されます。
このままdeployするとfavicon_link_tagがないのでassets_precompileで落ちます。
faviconを用意するかlayoutから削除しましょう。

・デザインの変更について

http://bootswatch.com/ から適当に
variables.lessをダウンロードし、中身をbootstrap_and_overrides.css.lessにコピペ。

45
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
sonicgarden
「お客様に無駄遣いをさせない受託開発」と「習慣を変えるソフトウェアのサービス」に取り組んでいるソフトウェア企業

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
45
Help us understand the problem. What is going on with this article?