Gem install looking for mapped drive
On the network my home folder is set as a mapped drive assigned the letter H. When executing "gem install rake" gets an error that H can't be found. The drive is mapped as H:. I see the .gems folder in that folder while the ruby install is in the root of c:. What do I need 开发者_如何学运维to change to have the ability to install gems?
I am guessing this is not the best solution, but I modified gem.bat in my ruby>bin folder. I wrapped the existing command with:
SET _HOMEDIRECTORY=%HOMEDIRECTORY%
SET HOMEDIRECTORY=C:
[existing code]
SET HOMEDIRECTORY=%_HOMEDIRECTORY%
This changes the environment variable of the home directory from H: to C:, installs, then returns it back to H:.
I got the idea from this thread: http://www.ruby-forum.com/topic/207694
精彩评论