&tag(TwitterBootstrapWithRails); *目次 [#z420c285] #contents *参考情報 [#j95158de] -[[twitter bootstrap railsを使ったら職が見つかり彼女も出来て背も3センチ伸びました。 - ppworks blog:http://ppworks.hatenablog.jp/entry/2012/02/19/033644]] *サンプル [#dc4cbf5a] -参考情報に従ってサンプルを作ってみる **前提 [#g82cc92a] -rvmをインストールしておく。 -ruby-1.9.3-p125をあらかじめインストールしておく。 $ rvm install ruby-1.9.3-p125 -MacPortsを使っている場合http.rbでSegmentation faultが発生するかもしれない([[Fixing a segmentation fault in Ruby 1.9.3:http://blog-jekyll.55minutes.com/2012/01/10/fixing-a-segmentation-fault-in-ruby-193/]])。その場合、つぎのようにインストールするとよいらしい。 rvm install ruby-1.9.3 --with-openssl-dir=/opt/local --with-iconv-dir=/opt/local **gemsetを作る [#e95bfd46] -@の後に指定された部分が、gemsetの名前(この場合tbrsample) rvm --create 1.9.3-p125@tbrsample -それを選択 rvm gemset use tbrsample **railsのインストール [#r03705f9] -gemでrailsインストール gem install rails --no-ri --no-rdoc **railsアプリを生成 [#g6cc4acc] -アプリ生成 rails new tbrsample -Gemfileを編集し以下を追加 gem "twitter-bootstrap-rails" -bundle installで必要なファイルをセットアップ。withoutを指定すればそこは除外される。 bundle install --without=production