rubyrubygemschrubyruby-install

Issues installing/updating Bundler


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.


Solution

  • 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.