Bundler:如何检查Gems是否是最新的

use*_*507 20 ruby bundler

使用Bundler,有没有办法检查是否有比Gemfile中指定的版本更新的宝石?换句话说,有没有办法检查我的宝石是否是最新的而没有实际更新?

tro*_*ynt 27

列出已安装的宝石,并提供更新的版本

$ bundle outdated [GEM] [--local] [--pre] [--source]
Run Code Online (Sandbox Code Playgroud)

选项:

--local:不要尝试远程获取gem并使用gem缓存

--pre:检查更新的预释放宝石

--source:检查特定来源

来源http://bundler.io/v1.3/bundle_outdated.html


sa1*_*125 2

如果您的意思只是查看是否需要更新(没有实际更新),您可能需要在 Gemfile 中指定使用某些存储库源进行比较,例如:

gem "rails", :git => "git://github.com/rails/rails.git"

或指定要比较的特定版本:version => ...

然后运行bundle check,它会列出所有过期的宝石。

编辑-我想这取决于最新的含义。