Gems home drive point to network drive, not my local

Hello everyone,
I have tricky situation where when I try to install a gem - it
tries to write on my H: drive, which is network drive and it is
extremely slow.
I've met the very same description of the
problem here, but unfortunately it doesn't solve my issue. From
the previous post I've read
this at github and specially the part with the network drive.
I've dome everything described there and this time the message
after I' set the #SET HOME=%USERPROFILE%# things are changed and it
comes with error "_permission denied_" in my home directory
d:\users\username.gem.