Rails bundle install production only

后端 未结 2 1760
傲寒
傲寒 2021-01-30 09:45

I\'m still new to rails/ruby/bundler and am a little confused.

In our config/application.rb file there\'s this bundler segment:

if defined?(         


        
相关标签:
2条回答
  • 2021-01-30 10:34

    An alternative solution is to use the bundle-only ruby gem. It can be used as follows:

    > gem install bundle-only
    > bundle-only production
    

    This library does not pollute your bundler configs or augment Gemfile.lock; it is a simple alternative to the built in bundle --without every other group option that bundler provides.

    0 讨论(0)
  • 2021-01-30 10:35

    Take a look at --without option:

    bundle install --without development test

    By default Bundler installs all gems and your application uses the gems that it needs. Bundler itself knows nothing about Rails and the current environment.

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