tag:help.rubygems.org,2010-01-19:/discussions/problems/333-install-gems-on-windows-7RubyGems.org: Discussion 2011-10-12T22:10:56Ztag:help.rubygems.org,2010-01-19:Comment/30299802010-09-20T10:06:44Z2010-09-20T10:06:45ZInstall gems on Windows 7<div><p>Hi,<br />
I'm trying to install a gem in a location of my preference. Defaults Rubygems seems determined to install on my user network drive, which I don't want.</p>
<p>I played around with GEM_HOME thinking this might be a way to specifiy a non-default location for my gems. I tried set GEM_HOME=D:/gems and set GEM_HOME=D:/gems/lib/ruby/gems/1.8. This variable does seem to do much. Gem install will always install in my user network drive.</p>
<p>I'm trying to do this on Windows 7 using Ruby 1.8.6 and Rubygems 1.3.7.<br />
Thanks and Regards,<br />
Onno</p></div>Onnotag:help.rubygems.org,2010-01-19:Comment/30299802010-09-25T05:13:12Z2010-09-25T05:13:12ZInstall gems on Windows 7<div><p>Can you paste the output of <code>gem env</code> ?</p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/30299802011-05-18T17:49:20Z2011-05-18T17:49:20ZInstall gems on Windows 7<div><p>I have the same problem with Ruby 1.9.2 and Ruby 1.9.1.</p>
<p>I have even uninstalled Ruby, removed the network drive, and
then installed after with no luck.</p>
<p>Also, gems keeps giving me an error where they specify there is
no space left on the network drive but several gigs of space is
available.</p></div>Jim Batestag:help.rubygems.org,2010-01-19:Comment/30299802011-05-18T18:08:41Z2011-05-18T18:08:41ZInstall gems on Windows 7<div><p>Please, either Jim Bates or Onno, provide the complete output of
your gem install command adding <code>--debug -V</code> options to
it.</p>
<p>E.g. If the command was <code>gem install rails</code> then the
full command will be <code>gem install rails --debug -V</code></p>
<p>Use Pastie.org or gist.github.com to upload the full output and
we will be able to help you better.</p></div>Luis Lavenatag:help.rubygems.org,2010-01-19:Comment/30299802011-05-18T21:10:25Z2011-05-18T21:10:25ZInstall gems on Windows 7<div><p>Exception <code>NameError' at
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/command_ma
nager.rb:163 - uninitialized constant Gem::Commands::InstallCommand
Exception</code>Errno::ENOENT' at<br>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/spec_f<br>
etcher.rb:54 - No such file or directory - H:/<br>
ERROR: While executing gem ... (Errno::ENOENT)</p>
<pre>
<code>No such file or directory - H:/
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:54:in</code>
</pre>
<p>`stat '</p>
<pre>
<code> C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:54:in</code>
</pre>
<p>`init ialize'</p>
<pre>
<code> C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:43:in</code>
</pre>
<p>`new'</p>
<pre>
<code> C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:43:in</code>
</pre>
<p>`fetc her'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:108<br>
:in `find_gems_with_sources'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:212<br>
:in `find_spec_by_name_and_version'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:244<br>
:in `install'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb<br>
:120:in `block in execute'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb<br>
:115:in `each'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb<br>
:115:in `execute'</p>
<pre>
<code> C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in</code>
</pre>
<p>`invoke'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:133:in
`<br>
process_args'</p>
<p>
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:103:in
`<br>
run'</p>
<pre>
<code> C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:63:in</code>
</pre>
<p>`run'</p>
<pre>
<code> C:/Ruby192/bin/gem:21:in `<main>'</code>
</pre>
<p>On 5/18/11 1:08 PM, "Luis Lavena"<br>
<a>tender+d89a9df9ad8ed50bfc1011c8f01b0d4d14660a55e@tenderapp.com</a>
wrote:</p></div>Jim Batestag:help.rubygems.org,2010-01-19:Comment/30299802011-05-18T23:03:30Z2011-05-18T23:03:30ZInstall gems on Windows 7<div><p>Thank you, was hoping you put this in a pastie anyhow.</p>
<p><code>H:/</code> seems to be a network drive.</p>
<p>Can you confirm the value of the following environment
variables?</p>
<p><code>SET HOME</code> <code>SET HOMEDRIVE</code> <code>SET
HOMEPATH</code> <code>SET USERPROFILE</code></p>
<p>Please add the output to this conversation.</p></div>Luis Lavenatag:help.rubygems.org,2010-01-19:Comment/30299802011-06-05T21:32:42Z2011-06-05T21:32:43ZInstall gems on Windows 7<div><p>I am getting the same error message.</p>
<p>Here is my debug text.</p>
<p><a href=
"http://pastie.org/2024367">http://pastie.org/2024367</a></p>
<p>And here are the values you ask for. In my case, H:/ is
definitely a network drive.</p>
<p><a href=
"http://pastie.org/2024356">http://pastie.org/2024356</a></p></div>Johntag:help.rubygems.org,2010-01-19:Comment/30299802011-06-06T03:27:41Z2011-06-06T03:27:41ZInstall gems on Windows 7<div><p>Hello,</p>
<p>On your second pastie I see you have some errors in the
definition of <code>HOMEPATH</code></p>
<p>Since <code>HOME</code> is not set, Ruby is trying to use the
combination of <code>HOMEDRIVE</code> and <code>HOMEPATH</code> but
the value you have in <code>HOMEPATH</code> seems invalid
(<code>echo %HOMEPATH%</code> seems completely invalid)</p>
<p>Please properly set <code>HOMEPATH</code> to the directory of
the <code>H:</code> unit assigned to you and try again.</p>
<p>Ideally, things should look this way:</p>
<pre>
<code>C:\Users\Luis\Projects\oss\ruby>set HOME
HOMEDRIVE=C:
HOMEPATH=\Users\Luis</code>
</pre>
<p>Where <code>C:</code> is in HOMEDRIVE and the path is on
HOMEPATH.</p>
<p>Please adjust that and try again.</p></div>Luis Lavenatag:help.rubygems.org,2010-01-19:Comment/30299802011-06-06T03:33:53Z2011-06-06T03:33:56ZInstall gems on Windows 7<div><p>Thanks for the response!</p>
<p>I saw a couple of sites that suggested renaming or deleting the
following directory:<br>
c:\ruby192\lib\ruby\site_ruby</p>
<p>I renamed it, and reinstalled. Everything worked great.</p></div>johntag:help.rubygems.org,2010-01-19:Comment/30299802011-06-06T03:41:19Z2011-06-06T03:41:19ZInstall gems on Windows 7<div><p>Dunno what renaming that directory has nothing to do with gem
installation <em>unless</em> your installation wasn't clear. Would
love to know were you read that...</p>
<p>Anyhow, it is clear that your environment variables are not
properly set and beyond that directory I forsee issues in the
future if these variables are not corrected.</p></div>Luis Lavenatag:help.rubygems.org,2010-01-19:Comment/30299802011-10-11T19:43:15Z2011-10-11T19:43:21ZInstall gems on Windows 7<div><p>FYI: It is not uncommon in company environments to map HOME to a
network drive (e.g. H: is mapped to \server\home\user). At least on
my computer (Windows 7) that network drive is not available from
the command line (e.g. I can access H: using Windows explorer, but
I cannot user the H drive from the command line).</p>
<p>In my case I could execute "SET HOME=%USERPROFILE%" and after
that it seems to work</p></div>Erik Larssontag:help.rubygems.org,2010-01-19:Comment/30299802011-10-12T14:53:36Z2011-10-12T14:53:36ZInstall gems on Windows 7<div><p>Is this resolved? Confused as to the current status of this
issue...can gems be installed properly on win7?</p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/30299802011-10-12T15:32:48Z2011-10-12T15:32:48ZInstall gems on Windows 7<div><p>I have set the gem up on several windows 7 boxes and I have
never been<br>
able to replicate the issue.</p></div>Jim Batestag:help.rubygems.org,2010-01-19:Comment/30299802011-10-12T15:47:55Z2011-10-12T15:47:55ZInstall gems on Windows 7<div><p>Hi nick.</p>
<p>I found the post using google, and thought to add my resolution
for others. You should not consider my addition as a reopening of
an old issue.</p>
<p>Kind regards<br>
/ Erik</p></div>Erik Larssontag:help.rubygems.org,2010-01-19:Comment/30299802011-10-12T15:51:36Z2011-10-12T15:51:36ZInstall gems on Windows 7<div><p>Hi jim. The issue is resolved for me. If youd like, i could
supply my configuration details (mapped network drive in offline
mode) and process (railsinstaller) for your knowledgebase?</p>
<p>/ Erik</p></div>Erik Larssontag:help.rubygems.org,2010-01-19:Comment/30299802011-10-12T17:23:36Z2011-10-12T17:23:36ZInstall gems on Windows 7<div><p>That would be great! I have added the support and knowledge base
manager<br>
to the thread.</p>
<p>Emil, Mark, and Eric. I'll follow up to you with the details
behind this<br>
one.</p></div>Jim Batestag:help.rubygems.org,2010-01-19:Comment/30299802011-10-12T22:10:54Z2011-10-12T22:10:54ZInstall gems on Windows 7<div><p>Would you mind adding this to the RubyInstaller's
Troubleshooting wiki page?</p>
<p><a href=
"https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting">https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting</a></p>
<p>Closing this now since the issue seems to be solved.</p></div>Luis Lavena