为什么’bundle install –without production’命令在更新后不需要’–without production’?
为什么不是第二个命令
$ bundle install
不需要
--without production
(因为这是它在教程中的用法,所以我认为它是正确的)不需要它背后发生了什么/推理?
来自http://ruby.railstutorial.org/chapters/a-demo-app#sec-demo_users_resource
$ bundle install --without production $ bundle update $ bundle install
我相信这是因为bundler
在项目文件夹中创建了一个.bundle/config
文件。 此文件存储--without production
选项以供稍后执行,因此您不必每次都键入它。
在开发计算机上运行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...]]