0

I have tried this a number of different ways. First I tried with RVM and it was just error after error and missing dependencies. Then I tried Rbenv and it was very much the same. Now, I have a combo of chruby and ruby-install to handle my versions of Ruby, but I can't update Bundler. It says that I am currently on 1.17.2, but I need 1.17.3. How do I upgrade this? I have searched everywhere, but all the solutions seems to be for RVM.

When I try to update Bundler this is the error that I get:

$ gem update bundler

ERROR:  Loading command: update (LoadError)
    cannot load such file -- zlib
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

I don't know what is causing this or how to get around it. Any help would be appreciated as I can't seem to find anything describing what is happening.

arcaderob
  • 481
  • 1
  • 7
  • 21
  • zlib is clearly missing. What OS are you using? What shell? What package manager? How and where did you install chruby and ruby-install? – Todd A. Jacobs Nov 14 '21 at 10:57
  • @ToddA.Jacobs - I am on MacOS Big Sur 11.6.1. Instead of Terminal, I am using iTerm2 and zsh instead of bash. When updating Bundler, I just used `gem update bundler`. To install chruby and ruby-install, I ran a script that was provided to me, but the script used Homebrew to install them. Thank you for your response. I am somewhat new to this. – arcaderob Nov 14 '21 at 17:28

1 Answers1

0

So, it turns out that I had multiple versions of Bundler installed on my machine and, somehow, two of them were simultaneously set to the default version. Manually finding the installed versions, deleting them and then reinstalling the desired version seemed to fix the issue. The key is using a Ruby manager (RVM, rbenv, etc.) and ensuring that any installation of a Ruby version and/or gems are done at either a system level or inside of a project as required.

arcaderob
  • 481
  • 1
  • 7
  • 21