2013-10-02 20 views

回答

20

我相信這是因爲bundler創建了一個.bundle/config文件項目的文件夾內。該文件存儲--without production選項供以後執行,這樣您就不必每次輸入它。

+1

我可以證實這一點。 運行'bundle install --without production'後,我發現'.bundle/config'包含以下內容:'--- \ nBUNDLE_WITHOUT:production' – Terrabits

1

在開發機器上運行bundle命令時,它不會安裝用於生產環境的gem。

在這裏看到:http://bundler.io/man/bundle-install.1.html

NAME 
bundle-install - Install the dependencies specified in your Gemfile 

SYNOPSIS 

bundle install [--binstubs[=DIRECTORY]] [--clean] [--full-index] [--gemfile=GEMFILE] [--jobs=NUMBER] [--local] [--deployment] [--no-cache] [--no-prune] [--path PATH] [--system] [--quiet] [--retry=NUMBER] [--shebang] [--standalone[=GROUP[ GROUP...]]] [--trust-policy=POLICY] [--without=GROUP[ GROUP...]]