how to install production group in the Gemfile

China☆狼群 提交于 2019-12-10 17:50:23

问题


my gem file consists :

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'
  gem 'puma',           '2.11.1'
end

when i give the bundle install command ,at the end i get the line

"Your bundle is complete!
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed."

How to install production group.?


回答1:


in your .bundle/config file you probably have this line:

BUNDLE_WITHOUT: production

Just delete this line, and the bundle install will also install the gems from the production group




回答2:


Follow this steps,

  1. bundle install --without development
  2. bundle install #remembers and includes --without development
  3. bundle install --without nothing

And now bundler installs all the gems.

Or you can directly try this one to install production group's gems only,

bundle install --without development test


来源:https://stackoverflow.com/questions/30802413/how-to-install-production-group-in-the-gemfile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!