Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rubygems-update requires Ruby version >= 2.3.0. #2534

Closed
khiav223577 opened this issue Dec 20, 2018 · 3 comments

Comments

@khiav223577
Copy link

commented Dec 20, 2018

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

My current problem is that I have projects using travis-ci to test them under ruby 2.2.
The command gem update --system broken after rubygems 3.0.0 being released.

=== 3.0.0 / 2018-12-19

The error messages:

gem update --system
Updating rubygems-update
ERROR:  Error installing rubygems-update:
	rubygems-update requires Ruby version >= 2.3.0.
ERROR:  While executing gem ... (NoMethodError)
    undefined method `version' for nil:NilClass
The command "gem update --system" failed and exited with 1 during .

Your build has been stopped.

I would like to known how to update rubygems to the latest compatible version without throwing errors?

This issue is related to:

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

Here are my current environment details:

$ ruby --version
ruby 2.2.7p470 (2017-03-28 revision 58194) [x86_64-linux]

$ rvm --version
rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

$ bundle --version
Bundler version 1.16.0

$ gem env version
2.6.11

I will abide by the code of conduct.

@amatsuda

This comment has been minimized.

Copy link
Member

commented Dec 20, 2018

would like to known how to update rubygems to the latest compatible version without throwing errors?

I hit the same problem and worked around like this. colszowka/simplecov@ba42382

@MSP-Greg

This comment has been minimized.

Copy link
Contributor

commented Dec 20, 2018

RubyGems 3.0.0 is only installable on Ruby >= 2.3

For 2.2 & 2.2.10, try

  - gem install "rubygems-update:<3.0.0" --no-document
  - update_rubygems

At present, RubyGems does not correctly handle Ruby version constraints.

EDIT: Windows type, not a bash type. For all Ruby versions, try:

gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)
gem update bundler --conservative

It does waste a bit of time downloading 3.0.0 when used on Ruby 2.2, but it still installs 2.7.8...

@hsbt hsbt closed this Dec 20, 2018

@hsbt

This comment has been minimized.

Copy link
Member

commented Dec 20, 2018

Please use solutions of @amatsuda or @MSP-Greg.

khiav223577 added a commit to khiav223577/active_model_cachers that referenced this issue Dec 20, 2018
khiav223577 added a commit to khiav223577/atomically that referenced this issue Dec 20, 2018
gkellogg added a commit to ruby-rdf/rdf that referenced this issue Dec 20, 2018
gkellogg added a commit to ruby-rdf/rack-linkeddata that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/sinatra-linkeddata that referenced this issue Dec 21, 2018
gkellogg added a commit to dryruby/ebnf that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-aggregate-repo that referenced this issue Dec 21, 2018
gkellogg added a commit to gkellogg/rdf-distiller that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-do that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-isomorphic that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-json that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-microdata that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-mongo that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-n3 that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-normalize that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-raptor that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-rdfa that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-rdfxml that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-reasoner that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-spec that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-tabular that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-trig that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-trix that referenced this issue Dec 21, 2018
gkellogg added a commit to ruby-rdf/rdf-turtle that referenced this issue Dec 21, 2018
Uepsilon added a commit to railslove/cmxl that referenced this issue Jan 10, 2019
gkellogg added a commit to ruby-rdf/rdf-normalize that referenced this issue Jan 20, 2019
khiav223577 added a commit to khiav223577/roulette-wheel-selection that referenced this issue Jan 20, 2019
rthbound added a commit to rthbound/oauth2 that referenced this issue Jan 26, 2019
Ensure travis installs a version of bundler that is compatible with o…
…auth2's gemspec file

  - Use [suggestion from @amatsuda](rubygems/rubygems#2534 (comment))
  to conservatively update rubygems
rthbound added a commit to rthbound/oauth2 that referenced this issue Jan 26, 2019
Allow bundler versions in the 2.*.* space
  - Use [suggestion from @amatsuda](rubygems/rubygems#2534 (comment))
  to conservatively update rubygems
timcraft added a commit to Nexmo/nexmo-ruby that referenced this issue Feb 4, 2019
electrofelix added a commit to electrofelix/vagrant-libvirt that referenced this issue Feb 13, 2019
Handle rubygems >= 3 dropping support for ruby < 2.3.0
Rubygems releases >= 3 have removed support for older versions of ruby
(<2.3). While testing with distributions with older versions of ruby
make sure to use the conservative install method as suggested from
rubygems/rubygems#2534 (comment)
@alphabt alphabt referenced this issue Feb 19, 2019
christopherstyles added a commit to christopherstyles/ngp_van that referenced this issue Feb 26, 2019
Install rubygems-update < v3
Since RubyGems 3.0.0 is only installable on Ruby >= 2.3, install a prior version to maintain compatibility.

See rubygems/rubygems#2534
christopherstyles added a commit to christopherstyles/ngp_van that referenced this issue Feb 26, 2019
Install rubygems-update < v3
Since RubyGems 3.0.0 is only installable on Ruby >= 2.3, install a prior version to maintain compatibility.

See rubygems/rubygems#2534
@martinpitt martinpitt referenced this issue Mar 13, 2019
0 of 1 task complete
jaynetics added a commit to jaynetics/character_set that referenced this issue Apr 2, 2019
Uepsilon added a commit to railslove/cmxl that referenced this issue Jun 3, 2019
ab added a commit to rest-client/rest-client that referenced this issue Aug 21, 2019
mracos added a commit to plataformatec/has_scope that referenced this issue Aug 22, 2019
Do not run `gem update --system` on travis CI
Since it breaks the build for rubies < 2.3 because it tries to install
version 3 of rubygems, which is incompatible.

We could go around and keep updating system gems by trying to install
rubygems 3 and if it fails we try to install version 2, as stated in
rubygems issue #2534. But since most of the issues that made us always
update the system gems are solved (conflit between rubygems and
bundler) I saw no need for it

Related:
- Kinda like: plataformatec/devise@6e4b0b9
- Issue about the error: rubygems/rubygems#2534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.