Why does 'bundle' install production gems on my development machine?

前端 未结 1 525
忘了有多久
忘了有多久 2021-02-12 15:21

Gemfile says:

gem \'sqlite3\', :groups => [:development, :test]
gem \'mysql2\', :group => :production

yet when I type bundle instal

1条回答
  •  一向
    一向 (楼主)
    2021-02-12 15:34

    The point of Bundler is to create a consistent gem environment across deployments. Gems, unfortunately, can interact even if they aren't loaded or required. So for maximum consistency, all gems should be installed, even if they aren't all required.

    However, if you don't want all gems installed all the time, you can use the bundle install --without option.

    0 讨论(0)
提交回复
热议问题