How to trace and check dependencies in bundled Ruby gems

前端 未结 2 1622
说谎
说谎 2020-12-31 13:25

Bundler will automatically install any dependencies for the specified gems, however it doesn\'t output which dependencies map to which gems in the standard output. That info

2条回答
  •  旧巷少年郎
    2020-12-31 14:07

    A less exciting, but equally effective way is to just do:

    gem dep
    

    which will generate a Gemfile.lock style output with dependency information. You could pipe this output to less:

    gem dep | less
    

    Or, if you are searching for a failing dependency, you could grep it with some context. For instance, to find out where my failing Thin dependency was coming from (fails with JRuby), I did:

    gem dep | grep -C 15 thin
    

提交回复
热议问题