0

I have Ruby 5.2.3, Homebrew, Xcode, and zlib 1.2.11 installed but I am still running into this error:

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

I've tried running gem install rails -v 5.2.3 gem install rails and sudo gem install rails and all give the same error.

  • Possible duplicate of [Can't install gems because "undefined method \`invoke\_with\_build\_args' for nil:NilClass"](https://stackoverflow.com/questions/23350388/cant-install-gems-because-undefined-method-invoke-with-build-args-for-nilni) – Yury Matusevich Sep 22 '19 at 11:35
  • Try update ruby gems with: `gem update --system` – demir Sep 22 '19 at 16:58

0 Answers0