开发者

Gem install looking for mapped drive

开发者 https://www.devze.com 2023-03-11 05:19 出处:网络
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 i

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

0

精彩评论

暂无评论...
验证码 换一张
取 消