Experimente sudo -E rvm reinstall ruby-2.4.0
.
De man sudo
:
-E, --preserve-env
Indicates to the security policy that the user wishes to preserve their existing environment variables. The security policy may return an error if the user does not have permission to preserve the environment.