Home > Software design >  How to get rubygems version in rails console?
How to get rubygems version in rails console?

Time:10-25

gem env or gem --version provides the rubygems version information, for example:

$ gem env
RubyGems Environment:
 - RUBYGEMS VERSION: 3.1.4
...

$ gem --version
3.1.4

Is it possible to get it in rails console?

CodePudding user response:

Gem::VERSION seems to work for me in the rails console.

> bundle exec rails c
irb(main):001:0> Gem::VERSION
=> "3.0.3"
  • Related