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

warning: constant Gem::ConfigMap is deprecated #3068

Closed
1 task done
rgaufman opened this issue Jan 4, 2020 · 64 comments
Closed
1 task done

warning: constant Gem::ConfigMap is deprecated #3068

rgaufman opened this issue Jan 4, 2020 · 64 comments

Comments

@rgaufman
Copy link

rgaufman commented Jan 4, 2020

I'm having a problem

My current problem is I'm running the latest version of ruby gems and I'm seeing deprecation warnings:

$ gem update --system
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
Latest version already installed. Done.

This issue is related to:

  • Other

Here are my current environment details:

$ gem env version
$ gem env version
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
3.1.2

$ ruby --version
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux-gnu]

I will abide by the code of conduct

@zucler
Copy link

zucler commented Jan 5, 2020

I have exactly the same issue.

$ gem --version
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
3.1.2

@deivid-rodriguez
Copy link
Member

Can you tell us more information about your ruby installation? Does the /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb file belong to an OS package?

@zucler
Copy link

zucler commented Jan 5, 2020

You can easily replicate it with the following Dockerfile:

FROM ubuntu:18.04
RUN apt update && apt install -y  ruby-dev
RUN gem update --system

Hopefully, it provides you with all details necessary.

@hsbt
Copy link
Member

hsbt commented Jan 5, 2020

It’s the distribution issue, especially debian.

@deivid-rodriguez
Copy link
Member

It sounds like this is fixed in rubygems-integration deb package version 1.13.0: https://salsa.debian.org/ruby-team/rubygems-integration/blob/19f2071a0f6e40ac04cdeae7fbcb14880aa24bf6/debian/changelog#L24. But in ubuntu only version 1.11.0 is shipped.

Maybe we should only ship this kind of deprecations on new rubies, so that distributions can update this at their own pace?

@hsbt
Copy link
Member

hsbt commented Jan 6, 2020

We couldn't control the patches on the Linux distributions. Because they will backport patches across Ruby versions.

@dissolve
Copy link

dissolve commented Jan 6, 2020

same issue on ubuntu 18.04

 gem env version
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /usr/share/rubygems-integration/all/specifications/net-http-persistent-2.9.4.gemspec:20.
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
3.1.2

@deivid-rodriguez
Copy link
Member

We couldn't control the patches on the Linux distributions. Because they will backport patches across Ruby versions.

Yeah, I mostly agree, but maybe deprecating things only on the newest ruby could be a good compromise between allowing us to move forward and deprecate things, but still avoid these kind of OS packaging issues, because when the new ruby gets shipped as a new OS package, deprecations will be fixed on it without the need for backports to older rubies.

I'll try raise an issue at https://salsa.debian.org/ruby-team/rubygems-integration to try get feedback about this and figure out the best way to do things.

In the mean time, the workaround (or maybe final "fix" depending on what conclusions we reach) is: never upgrade rubygems through gem update --system on an OS packaged ruby. Instead, always do it through the OS package manager (apt-get install or whatever).

@hsbt
Copy link
Member

hsbt commented Jan 6, 2020

I'll try raise an issue at https://salsa.debian.org/ruby-team/rubygems-integration to try get feedback about this and figure out the best way to do things.

👍

never upgrade rubygems through gem update --system on an OS packaged ruby. Instead, always do it through the OS package manager (apt-get install or whatever).

Completely agreed. If we will support the upgrading the rubygems provided by the operating system., We should test them with CI.

@qume
Copy link

qume commented Jan 6, 2020

This probably doesn't help now you've identified the issue, but FWIW this is on Mint 19.1 after doing a
gem update --system
yesterday

$ gem --version
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /var/lib/gems/2.5.0/specifications/activerecord-spatialite-adapter-0.4.1.gemspec:18.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /var/lib/gems/2.5.0/specifications/rgeo-activerecord-0.4.6.gemspec:18.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /var/lib/gems/2.5.0/specifications/sqlite3-ruby-1.3.3.gemspec:20.
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
3.1.2

@Jakanapes
Copy link

we're seeing this issue as well, but only with

bundle exec gem --version

Going through the logs to see if there have been any recent updates.

Rubygems 3.1.1
Ruby 2.5.5
Bundler 2.0.2

@deivid-rodriguez
Copy link
Member

I created a thread in debian mailing lists to ask about this: https://lists.debian.org/debian-ruby/2020/01/msg00015.html.

Also, if I may ask the people getting this issue. Why are you upgrading rubygems?

@deivid-rodriguez
Copy link
Member

Regarding my previous question, let me clarify. Is it because of some instructions or documentation you read somewhere, or is it just because you wanted to pick up some bug fix or feature, or simply run the latest version?

I'm asking because maybe we should clarify such documentation if it exists.

@qume
Copy link

qume commented Jan 9, 2020

@deivid-rodriguez I was having a problem which unfortunately I can't remember the detail of now, and a suggestion on stack exchange was to try running the update.

Have since switched to rbenv and not looking back. I'm surprised one of the ruby version managers isn't distributed by default in the distros.

@mikosullivan
Copy link

mikosullivan commented Jan 10, 2020

I'm having this problem just by running ruby. I just udated Rubygems and it started happening.

~ # ruby
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated

~ # ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

@deivid-rodriguez
Copy link
Member

I got a reply from debian packagers, see https://lists.debian.org/debian-ruby/2020/01/msg00025.html.

To summarize:

  • They consider moving the updated rubygems-integration package to the stable repositories so users can pick it up.
  • They consider splitting out a separated rubygems deb package, so rubygems can be upgraded separately from ruby through the OS package manager.
  • They would be happy if we deprecated things only on new rubies, so they have time to prepare packages with fixed deprecations and old users don't get them.

I think deprecating things only on newest rubies is a good compromise, and it also gives us a clear deprecation horizon. We can fully remove the deprecated code once we drop support for the ruby version where the deprecation is first being printed. I think it should be easy to implement, what do you think @hsbt?

@hsbt hsbt self-assigned this Jan 10, 2020
@rennex
Copy link

rennex commented Jan 15, 2020

A quick tip for anyone finding this issue before a newer version fixes things: I got rid of the warnings by downgrading to the latest RubyGems that doesn't have the deprecation warning:

gem update --system 3.0.6

I did this on Ubuntu 18.04 and it worked nicely. Another option may be to set the env variable DEBIAN_DISABLE_RUBYGEMS_INTEGRATION (to any value), which disables the problematic library that gets autoloaded, but for me that caused issues with some installed gems.

@matkoniecz
Copy link

Also, if I may ask the people getting this issue. Why are you upgrading rubygems?

Bundler asked me to do this.

@costa
Copy link

costa commented Jan 19, 2020

Regarding my previous question, let me clarify. Is it because of some instructions or documentation you read somewhere, or is it just because you wanted to pick up some bug fix or feature, or simply run the latest version?

I'm asking because maybe we should clarify such documentation if it exists.

@deivid-rodriguez
I never update bundler unless forced: this time it was after installation of ruby-all-dev=1:2.5.1 in a ubuntu:18.04 container:

RUN gem update --system  # NOTE this nonsense is required for this version apparently
RUN gem install bundler -v '~> 2.0'

@deivid-rodriguez
Copy link
Member

It's perfectly fine to upgrade rubygems, we're actually very happy that people use the latest version and pickup our bugfixes and new features. The problem is that if for some reason you're using ruby through OS packages, you shouldn't upgrade rubygems through gem update --system. So if some instructions or Dockerfile out there do things like

RUN apt install ruby
RUN gem update --system

we should fix it.

@costa
Copy link

costa commented Jan 22, 2020

OK, my problem has turned to be another bundler-Gemfile.lock quirk (which I "workarounded" with the superfluous gem update --system and which my fair experience failed to help me understand), and though I don't entirely understand a possible cause for the warning (looks like some deps inconsistency), my issue is closed at the moment.

@brenobarreto
Copy link

Also, if I may ask the people getting this issue. Why are you upgrading rubygems?

The bundler asked me to upgrade rubygems.

I got rid of the warnings by downgrading to the latest RubyGems that doesn't have the deprecation warning

I did the same thing here on Ubuntu 18.04 and it's fixed.

dscho added a commit to dscho/git that referenced this issue Feb 9, 2020
A recent update in the Linux VM images used by Azure Pipelines surfaced
a new problem in the "Documentation" job. Apparently, this warning
appears 396 times on `stderr` when running `make doc`:

/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated

This problem was already reported to the `rubygems` project via
rubygems/rubygems#3068.

As there is nothing Git can do about this warning, and as the
"Documentation" job reports this warning as a failure, let's just
silence it and move on.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@bryszard
Copy link

bryszard commented Jul 14, 2020

I have same problem, but in different circumstances.

Using Ubuntu 18.04 and Ruby 2.7.1 (image from https://www.brightbox.com/docs/ruby/ubuntu/) the first time this error appeared when running -

RUN gem install bundler -v 1.17.3
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated

Afterwards I updated bundler to 2.1.4, tried gem update --system (resolved to 3.1.4), gem update --system 3.0.6, gem update --system 3.0.8 and gem update --system 3.2.0.rc.1. Nothing has changed, and the deprecation warning was shown also after running:

RUN gem update --system <any version>

On versions 3.0.6 and 3.0.8 I also got some more warnings and errors (I guess related to using Ruby 2.7.1).

I was hoping I can switch to Ruby 2.7 still on Ubuntu 18.04.

EDIT: Using DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=true works for now (at least I can build an image without any warnings). Thanks for all the hints.

@deivid-rodriguez
Copy link
Member

I'm guessing ubuntu also needs to fix the warnings, but I have no idea where ubuntu manages its package sources.

@simi
Copy link
Member

simi commented Jul 14, 2020

it seems it will be backported from debian at some point - https://git.launchpad.net/ubuntu/+source/rubygems-integration/log/

@lavie3k
Copy link

lavie3k commented Jul 14, 2020

I'm guessing ubuntu also needs to fix the warnings, but I have no idea where ubuntu manages its package sources.

Yep. It is Ruby 2.7.0.
:( Please help me. Because if I start Wpscan or Evil-winrm ... it is error :(((

@lavie3k
Copy link

lavie3k commented Jul 14, 2020

I have same problem, but in different circumstances.

Using Ubuntu 18.04 and Ruby 2.7.1 (image from https://www.brightbox.com/docs/ruby/ubuntu/) the first time this error appeared when running -

RUN gem install bundler -v 1.17.3
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated

Afterwards I updated bundler to 2.1.4, tried gem update --system (resolved to 3.1.4), gem update --system 3.0.6, gem update --system 3.0.8 and gem update --system 3.2.0.rc.1. Nothing has changed, and the deprecation warning was shown also after running:

RUN gem update --system <any version>

On versions 3.0.6 and 3.0.8 I also got some more warnings and errors (I guess related to using Ruby 2.7.1).

I was hoping I can switch to Ruby 2.7 still on Ubuntu 18.04.

EDIT: Using DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=true works for now (at least I can build an image without any warnings). Thanks for all the hints.

How to fix it ???
Please help me step by steps.

@hsbt
Copy link
Member

hsbt commented Jul 14, 2020

@lavie3k Your issue is different from this pull-request. Can you file it the new issue?

Please help me step by steps.

This tracker is NOT the support forum. If you want to get the support for the several issues, https://stackoverflow.com/ may helps you.

@matt-wallis
Copy link

I encountered this issue because the document How to Upgrade to Bundler 2, tells you to do gem update --system, under certain circumstances. Like many here, I was using Ubuntu 18.04 - the current LTS version of Ubuntu, and at the time Bundler 2 depended on rubygems3, so I blindly went ahead with the system update.

There should be a big warning in that document that doing this may destabilise your system. I would not have entered this command if I had been thinking straight! What you get with an Ubuntu release is a set of packages that have been carefully tested, so that they work together. Doing gem update --system breaks that.

For what it's worth, I think it was a mistake for Bundler to depend on on RubyGems 3, as it did when it was announced:

Bundler 2 requires RubyGems 3.0, so install that first by running:
$ gem update --system

Looking again at How to Upgrade to Bundler 2, I see that it now says:

The big change is that Bundler now requires at least Ruby 2.3.0 and RubyGems 2.5.0.

I wonder what brought about that change??? Anyway, this has been a bit of a rant, but

  • I do think that doc needs to warn of the possibly destabilising effect of gem update --system
  • Perhaps there's a solution to this issue for some people, based on Bunder2 now only needing rubygems 2.5.0?

@deivid-rodriguez
Copy link
Member

That's for your feedback @matt-wallis

For what it's worth, I think it was a mistake for Bundler to depend on on RubyGems 3, as it did when it was announced:

Yep, this was a mistake.

There should be a big warning in that document that doing this may destabilise your system. I would not have entered this command if I had been thinking straight! What you get with an Ubuntu release is a set of packages that have been carefully tested, so that they work together. Doing gem update --system breaks that.

Yeah, we're working towards that goal. @simi just suggested this which I find a very good idea. We also provided a way for OS packagers to completely disable gem update --system: #3720.

@matt-wallis
Copy link

That's for your feedback @matt-wallis

@deivid-rodriguez you're welcome.

Perhaps there's a solution to this issue for some people, based on Bunder2 now only needing rubygems 2.5.0?

Might a solution to this issue for the people who are here becasue of bundler's advice be gem update --system 2.5.x? And if so, shouldn't that be in the docs (with lots of clarification...). Having said that, I'm just guessing, and I don't understand this stuff in any depth. Maybe I'm being naïve.

@deivid-rodriguez
Copy link
Member

Might a solution to this issue for the people who are here becasue of bundler's advice be gem update --system 2.5.x?

That's the oldest rubygems we currently support, it sounds like downgrading too much to me, and it might lead to other issues. I'm happy to add a note to the docs telling people that updated the rubygems version shipped by a OS packaged ruby through gem update --system, that they can partially undo the upgrade to get rid of the warnings with gem update --system 3.0.8.

@matt-wallis
Copy link

matt-wallis commented Jul 15, 2020

That's the oldest rubygems we currently support, it sounds like downgrading too much to me, and it might lead to other issues.

That makes sense.

I'm happy to add a note to the docs telling people that updated the rubygems version shipped by a OS packaged ruby through gem update --system, that they can partially undo the upgrade to get rid of the warnings with gem update --system 3.0.8.

Sounds like a good idea. I guess this problem will go away for those on Ubuntu 18.04 once they upgrade to 20.04? I see that 20.04.1 is due 2020-08-06, and at this point 18.04 users will be notified that a new OS version is available.

@deivid-rodriguez
Copy link
Member

We now provide a way for OS packagers to disable non-OS rubygems upgrades, and we hope it will be used. There's also workaround steps in this thread.

We should be more careful in the future when deprecating stuff used by OS package extension, but I think I'm going to proceed with closing this, because there's not too much we can do at this point, and fixed OS packages will slow start reaching users so this will be less of an issue as time passes.

@deivid-rodriguez
Copy link
Member

Ok, closing then!

@voghDev
Copy link

voghDev commented Oct 9, 2020

I was getting these warning messages today. Output:

$ bundle exec gem --version
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
3.1.4

As @rennex said, I downgraded with

$ gem update --system 3.0.6

and after some more of these messages, RubyGems system software updated and no more warnings :D

Fixed! 🎉

@dotnetCarpenter
Copy link

@voghDev Too bad that you didn't see that you should have downgraded to 3.0.8

$ gem update --system 3.0.8

🎉

@voghDev
Copy link

voghDev commented Oct 15, 2020

@voghDev Too bad that you didn't see that you should have downgraded to 3.0.8

$ gem update --system 3.0.8

Thanks for the observation. I'll "down-upgrade" to 3.0.8 then 🎉 😂

$ gem update --system 3.0.8

💜

pavsaund added a commit to dolittle-entropy/playbook that referenced this issue Oct 20, 2020
This introdduces a local development environment based on docker, thus removing the need to install ruby/docker and maintain this on the local dev machine.

Based on rubygems/rubygems#3068
Updates based on rubygems/rubygems#3068
@dvodvo
Copy link

dvodvo commented Dec 13, 2020

ruby 2.6.1
rails 6.0
MAC OSX 10.9.5
Bundler version 2.1.4
gem -v 3.0.8

After running gem update --system 3.0.8 the warning: already initialized constant message disappeared from tests (where it is truly annoying!). But not out of the woods yet. When creating scaffolds, migrating -rake tasks, paaprently- those errors appear.

So my conclusion, since rails testing essentially recreates the database then destroys it, that to eliminate the warnings the db needs to be exported, dropped, recreated and re-imported?

Is this assumption correct? [checking in case I may be missing something and blunder into something]

@jauharvp
Copy link

@voghDev Too bad that you didn't see that you should have downgraded to 3.0.8

$ gem update --system 3.0.8

Thanks for the observation. I'll "down-upgrade" to 3.0.8 then tada joy

$ gem update --system 3.0.8

purple_heart

worked on kali

@hwnnaung
Copy link

I was getting these warning messages today. Please suggest me . Output:

Screenshot_2021-02-13_20-55-01

@sukrosono
Copy link

sukrosono commented Mar 23, 2021

so sorry but:

gem update --system 3.0.6
Updating rubygems-update
Fetching rubygems-update-3.0.6.gem
Successfully installed rubygems-update-3.0.6
Parsing documentation for rubygems-update-3.0.6
Installing ri documentation for rubygems-update-3.0.6
Installing darkfish documentation for rubygems-update-3.0.6
Done installing documentation for rubygems-update after 146 seconds
Parsing documentation for rubygems-update-3.0.6
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.0.6
Traceback (most recent call last):
	5: from setup.rb:28:in `<main>'
	4: from setup.rb:28:in `require'
	3: from /root/gems/gems/rubygems-update-3.0.6/lib/rubygems.rb:1372:in `<top (required)>'
	2: from /root/gems/gems/rubygems-update-3.0.6/lib/rubygems.rb:1372:in `require'
	1: from /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:3:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:33:in `singleton class': undefined method `default_specifications_dir' for class `#<Class:Gem>' (NameError)

 gem update --system 3.0.8
Updating rubygems-update
Fetching rubygems-update-3.0.8.gem
Successfully installed rubygems-update-3.0.8
Parsing documentation for rubygems-update-3.0.8
Installing ri documentation for rubygems-update-3.0.8
Installing darkfish documentation for rubygems-update-3.0.8
Done installing documentation for rubygems-update after 146 seconds
Parsing documentation for rubygems-update-3.0.8
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.0.8
Traceback (most recent call last):
	5: from setup.rb:28:in `<main>'
	4: from setup.rb:28:in `require'
	3: from /root/gems/gems/rubygems-update-3.0.8/lib/rubygems.rb:1372:in `<top (required)>'
	2: from /root/gems/gems/rubygems-update-3.0.8/lib/rubygems.rb:1372:in `require'
	1: from /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:3:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:33:in `singleton class': undefined method `default_specifications_dir' for class `#<Class:Gem>' (NameError)

gem update --system
Updating rubygems-update
Successfully installed rubygems-update-3.2.15
Parsing documentation for rubygems-update-3.2.15
Done installing documentation for rubygems-update after 0 seconds
Parsing documentation for rubygems-update-3.2.15
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.2.15
Traceback (most recent call last):
	5: from setup.rb:23:in `<main>'
	4: from setup.rb:23:in `require'
	3: from /home/enter/gems/gems/rubygems-update-3.2.15/lib/rubygems.rb:1348:in `<top (required)>'
	2: from /home/enter/gems/gems/rubygems-update-3.2.15/lib/rubygems.rb:1348:in `require'
	1: from /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:49:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:50:in `<class:Specification>': undefined method `rubyforge_project=' for class `Gem::Specification' (NameError)


@simi
Copy link
Member

simi commented Mar 23, 2021

You should most likely downgrade manually.

see https://rubygems.org/pages/download

@rlaunemacedo
Copy link

Resolvi com o comando:
sudo gem update --system 3.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests