如何在Gemfile中安装生产组

swe*_*pvl 3 ruby gem rubygems ruby-on-rails ruby-on-rails-4

我的宝石文件包括:

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'
  gem 'puma',           '2.11.1'
end
Run Code Online (Sandbox Code Playgroud)

当我发出bundle install命令时,最后我得到了这条线

"Your bundle is complete!
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed."
Run Code Online (Sandbox Code Playgroud)

如何安装生产组.

Yur*_*dev 7

在你的.bundle/config文件中你可能有这一行:

BUNDLE_WITHOUT: production
Run Code Online (Sandbox Code Playgroud)

只需删除此行,并且bundle install还将安装production组中的gem