How to tell which version of a gem a rails app is using

后端 未结 15 1165
生来不讨喜
生来不讨喜 2020-12-13 11:32

I\'m investigating a rails app - the prod server has two version of a specific gem installed, how can I tell which version the prod app is using?

15条回答
  •  长情又很酷
    2020-12-13 12:30

    There probably is a more direct way to find this out, but if you load up a console and require a specific version like so:

    gem 'RedCloth', '3.0.4'
    

    It will tell you what version is already activated:

    => Gem::LoadError: can't activate RedCloth (= 3.0.4, runtime) for [], already activated RedCloth-4.2.2
    

提交回复
热议问题