bundle-inject - 在 Gemfile 中添加指定 gem 及其版本要求
bundle inject [GEM] [VERSION]
将指定 gem 及其版本要求添加到已解析的 Gemfile(5) 中。
如果 gem 尚未列出,此命令会将其添加到 Gemfile(5) 和 Gemfile.lock 中。
示例
bundle install
bundle inject 'rack' '> 0'
这将在您的 Gemfile(5) 和 Gemfile.lock 中注入版本大于 0 的 'rack' gem。
bundle inject 命令在 Bundler 2.1 中已弃用,将在 Bundler 3.0 中移除。