Bundle install selected group into custom path

a 夏天 提交于 2019-12-25 03:48:07

问题


As a follow up to Bundle deployment only for selected gems, using the solution of blacklisting using --without option, for example:

group :runtime do
  gem 'rails'
  ...
end
group :runtime_unpackaged do
  gem 'less2sass'
end

The runtime_unpackaged can be installed using the command:

bundle --path vendor/bundle --without runtime

The runtime group is installed through debian packages as the application itself is packaged as a .deb package.

But then all other gems at group runtime won't be handled anymore by the application as this command will create a file .bundle/config that filters them out.

In other words, I want to load the application using gems from the system - debian jessie packages - (group runtime) and also gems installed locally at vendor/bundle (group runtime_unpackaged).


回答1:


If you want to run Bundler and have it load both groups, you should just be able to run bundle install and leave out the --without flag. You can also set specific groups to get run with bundle install in your application.rb file using Bundler.require(:group1, :group2, etc..). Check out Bundler.io's section on groups



来源:https://stackoverflow.com/questions/36993642/bundle-install-selected-group-into-custom-path

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