Rubygems: I didn't know the current Ruby version when error was occured caused by old version of Ruby.

Created on 26 Nov 2016  ·  3Comments  ·  Source: rubygems/rubygems

I'm having a problem or would like to suggest a feature.

My current problem is that I didn't know the current Ruby version when error was occured caused by old version of Ruby.

This issue is related to:

  • [ ] Network problems
  • [x] Installing a library
  • [ ] Publishing a library
  • [ ] The command line gem
  • [ ] Other

Here are my current environment details:

With ruby ​​version set to 2.1.3p242 Installing rails has the following result.

$ gem install rails
Fetching: activesupport-5.0.0.1.gem (100%)
ERROR:  Error installing rails:
    activesupport requires Ruby version >= 2.2.2.

In this error message the user don't know how to check the current version.
I propose the following two methods

  1. Appending #{Ruby version} to error message
$ gem install rails
Fetching: activesupport-5.0.0.1.gem (100%)
ERROR:  Error installing rails:
    activesupport requires Ruby version >= 2.2.2. current version is #{Ruby version}
  1. Describing how to check version
$ gem install rails
Fetching: activesupport-5.0.0.1.gem (100%)
ERROR:  Error installing rails:
    activesupport requires Ruby version >= 2.2.2. please execute 'ruby -v'
feature request

Most helpful comment

@bronzdoc only on Gem::RuntimeRequirementNotMetError, I think

All 3 comments

Something like (1) seems reasonable, and we ought to do the same on rubygems version mismatches

Should we add that ruby version message whenever a Gem::InstallError is raised?

@bronzdoc only on Gem::RuntimeRequirementNotMetError, I think

Was this page helpful?
0 / 5 - 0 ratings