45
44

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.

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
44
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
45
44

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?