Using rvm, anytime I try to install or update a gem (or rubygems), I get the same error:
$ gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.6.6.gem (100%)
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
My system ruby however, works fine.
This is a bug in the ruby gem installer of version 2.5.x. Patch the file installer.rb (on my machine in /usr/local/lib/ruby/2.3.0/rubygems/installer.rb) as follows:
Replace:
if ruby_executable then
question << existing
With:
if ruby_executable then
question << (existing || 'an unknown executable')
sudo dnf -y remove ruby\*
sudo find /usr -name "*ruby*" -exec rm -fr {} \;
sudo dnf install -y ruby
sudo gem update --system
works for me, probably a rubygems directory removal failed
PS : I'm on fedora
but this should work on ubuntu
/ debian
by using apt-get instead of dnf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With