Search code examples
ruby-on-railsrubyrubygemsgemfile

gem update --system error: no implicit conversion of nil into String


I'm running on windows and I am not able to update my rubygems either from using the command

gem update --system

or by manually installing the gem. I get the following error

ERROR:  While executing gem ... (TypeError)
    no implicit conversion of nil into String

I don't have this issue while installing or updating other gems as far as I can see.

This is the complete output when running with --verbose

http://pasted.co/11325f4e


Solution

  • This is a bug in the ruby gem installer system.

    Patch the file installer.rb:

    Replace:

    if ruby_executable then
          question << existing
    

    With:

    if ruby_executable then
          question << (existing || 'an unknown executable')