LoginSignup
14

More than 5 years have passed since last update.

posted at

updated at

安全で高速なbundle install(ディレクトリを指定&並列化&省略オプション)

  1. bundle installせずにrailsプロジェクトを作成する
rails new test -BT

(B ... skip bundle)
(T ... skip test unit)

  • gemインストール先のパスを指定

ついでに
* staging, production環境は必要ないので除外設定
* --jobs=4 は並列処理の設定 これがあると高速化するのでついでに追加

bundle install --path vendor/bundle --without staging production --jobs=4

bundlerはオプションを以下のファイルに自動で記録して、次回以降省略できる。

---
BUNDLE_PATH: vendor/bundle
BUNDLE_JOBS: 4
BUNDLE_WITHOUT: staging:production
BUNDLE_DISABLE_SHARED_GEMS: '1'

以上!

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
What you can do with signing up
14