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

gem update dbm fails - wrong number of arguments (given 4, expected 1) #12

Closed
firecall opened this issue Aug 5, 2021 · 2 comments
Closed

Comments

@firecall
Copy link

firecall commented Aug 5, 2021

Hi,

I've never seen this error before!

I tried the suggested solutions in the previous thread: #8

But still not updating?

Clean install of Ubuntu 18.04.5 LTS on Vultr.

Ruby version 2.5.1 via sudo apt install ruby.

Any ideas?

$ gem update dbm
Updating installed gems
Updating dbm
ERROR:  While executing gem ... (ArgumentError)
    wrong number of arguments (given 4, expected 1)
@olleolleolle
Copy link
Contributor

2.5.1 is an ancient Ruby, from before the "gemification" of standard library gems. During that time, there was no upgrade path via gems for your standard library code. It shipped with your implementation.

So, in the current era, the code being created in the standard library gems does not necessarily support the older versions of Ruby.

I can see that the information on https://www.ruby-lang.org/en/documentation/installation/#apt will get you the 2.5.1 version, but that's not the bestest. Here's what the page also says:

It is possible that major package managers will install older Ruby versions instead of the latest release. To use the latest Ruby release, check that the package name matches its version number. Or use a dedicated installer.

So, my advice would be: Avoid either updating that library, or better, try installing and using a newer version of Ruby.

Hope this helps! 👋

@firecall
Copy link
Author

Thanks!

I did in the end get Ruby version updated :-)

and my problems went away!

Cant recall why I was stuck on 2.5.1.. must have been some other reason LOL :-)

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

No branches or pull requests

2 participants