LoginSignup
12
14

More than 5 years have passed since last update.

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

Last updated at Posted at 2015-05-19
  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'

以上!

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