# Working RubyGems on Windows

**URL:** <https://www.ruby-forum.com/t/working-rubygems-on-windows/116034>\
**Category:** Ruby\
**Created:** [October 1, 2007, 7:44pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034 "2007-10-01T19:44:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 1, 2007, 7:44pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/1 "2007-10-01T19:44:46Z")

</div>

I really need to get RubyGems working on Windows. Versions 0.9.2,  
0.9.4 and current trunk all fail. Can someone recommend a solution. Is  
there an old version that I can install that’s sure to work?

Thanks,  
T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 1, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/2 "2007-10-01T20:42:10Z")

</div>

I use it all the time on XP

C:\>ruby -v  
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]

C:\>gem -v  
0.9.4

You should describe your issue a little more.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 1, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/3 "2007-10-01T23:07:58Z")

</div>

On Oct 1, 2007, at 10:43 , Trans wrote:

> I really need to get RubyGems working on Windows. Versions 0.9.2,  
> 0.9.4 and current trunk all fail. Can someone recommend a solution. Is  
> there an old version that I can install that’s sure to work?

I spent many hours with Curt H. getting the one-click installer’s  
RubyGems working correctly. We were both satisfied by it when the  
last one-click shipped.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 2, 2007, 4:54am UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/4 "2007-10-02T04:54:44Z")

</div>

Trans wrote:

> With 0.9.4…
> 
> C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
> rubyscript2exe ERROR: While executing gem …  
> (Gem::RemoteFetcher::FetchError)  
> getaddrinfo: no address associated with hostname.(SocketError)
> 
> C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
> rubyscript2exe -no-http-proxy  
> ERROR: While executing gem … (NoMethodError)  
> undefined method `[]=’ for #Gem::ConfigFile:0x2e2ebc0
> 
> With trunk:
> 
> C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
> rubyscript2exe  
> c:/ruby/bin/gem.bat:19: uninitialized constant Gem::GemRunner  
> (NameError)
> 
> T.

Something must be wrong with your Ruby or RubyGems install. I just  
install the 1.8.6-25 one-click-installer in a virtual of XP and  
everything worked fine. Here are the steps I followed.

Add c:\ruby\bin to the beginning of my PATH.

c:\> gem up --system

(ran that twice)

c:\>gem pristine --all  
ERROR: While executing gem … (Zlib::BufError)  
buffer error

(followed the fix here:  
[http://www.nabble.com/Zlib::BufError-t4011137.html](http://www.nabble.com/Zlib::BufError-t4011137.html))

c:\>gem pristine --all

(install ruby-1.8.6-p110-i386-mswin32.zip into c:\ruby)

c:\>gem up -y (updates lots of win32 stuff)

C:\>ruby -v  
ruby 1.8.6 (2007-09-23 patchlevel 110) [i386-mswin32]

C:\>gem -v  
0.9.4

One last thing - I avoid using paths with spaces. You might double-check  
that your PATH and all the \*.BAT files in c:\ruby\bin do _NOT_ have any  
paths with spaces. It works better for me - might help you.

Good luck.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 1, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/5 "2007-10-01T22:57:18Z")

</div>

On Oct 1, 11:40 am, dima [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I use it all the time on XP
> 
> C:\>ruby -v  
> ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
> 
> C:\>gem -v  
> 0.9.4
> 
> You should describe your issue a little more.

I described it in the “OneClickInstaller/RubyGems” thread. But I’ll  
reiterate:

With 0.9.4…

C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
rubyscript2exe ERROR: While executing gem …  
(Gem::RemoteFetcher::FetchError)  
getaddrinfo: no address associated with hostname.(SocketError)

C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
rubyscript2exe -no-http-proxy  
ERROR: While executing gem … (NoMethodError)  
undefined method `[]=’ for #Gem::ConfigFile:0x2e2ebc0

With trunk:

C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
rubyscript2exe  
c:/ruby/bin/gem.bat:19: uninitialized constant Gem::GemRunner  
(NameError)

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 2, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/6 "2007-10-02T17:03:55Z")

</div>

On Oct 1, 5:07 pm, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Oct 1, 2007, at 10:43 , Trans wrote:
> 
> > I really need to get RubyGems working on Windows. Versions 0.9.2,  
> > 0.9.4 and current trunk all fail. Can someone recommend a solution. Is  
> > there an old version that I can install that’s sure to work?
> 
> I spent many hours with Curt H. getting the one-click installer’s  
> RubyGems working correctly. We were both satisfied by it when the  
> last one-click shipped.

I don’t know what to tell you then. It’s not working for me. I just  
removed everything and tried again. I downloaded the OneClickInstaller  
from [ruby-lang.org](http://ruby-lang.org) ([http://rubyforge.org/frs/download.php/18566/](http://rubyforge.org/frs/download.php/18566/)  
ruby186-25.exe). Installed it. And then did:

C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
rubyscript2exe  
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)  
getaddrinfo: no address associated with hostname.(SocketError)

C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
rubyscript2exe --no-http-proxy  
ERROR: While executing gem … (NoMethodError)  
undefined method `[]=’ for #Gem::ConfigFile:0x2df7864

C:\Documents and Settings\Milton\My Documents\Tom\>gem --version  
0.9.2

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 2, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/7 "2007-10-02T17:15:03Z")

</div>

On Oct 1, 10:54 pm, Kevin W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > ERROR: While executing gem … (NoMethodError)
> 
> Something must be wrong with your Ruby or RubyGems install. I just  
> install the 1.8.6-25 one-click-installer in a virtual of XP and  
> everything worked fine. Here are the steps I followed.
> 
> Add c:\ruby\bin to the beginning of my PATH.
> 
> c:\> gem up --system
> 
> (ran that twice)

I can’t get this far b/c of:

C:\Documents and Settings\Milton\My Documents\Tom\>gem up --system  
Updating RubyGems…  
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)  
getaddrinfo: no address associated with hostname.(SocketError)

C:\Documents and Settings\Milton\My Documents\Tom\>gem up --system –  
no-http-proxy  
ERROR: While executing gem … (NoMethodError)  
undefined method `[]=’ for #Gem::ConfigFile:0x2df78f0

> From what I gather this is a Firewall issue. But I have yet to find  
> anyone with a solution, though the problem mentioned enough (just do a  
> Google search on it). Most cases it’s people trying to install Rails,  
> so they just end up manually installing Rails instead. If it is a  
> Firewall issue shouldn’t be a simple a matter of opening up the right  
> port? What port is it?

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 2, 2007, 6:43pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/8 "2007-10-02T18:43:38Z")

</div>

On Oct 2, 9:22 am, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > rubyscript2exe  
> > ERROR: While executing gem … (NoMethodError)  
> > email with the information I’ve requested. I can not help you  
> > without it.

Sorry. At the time I thought we had gotten past the proxy problem. I  
replied as requested.

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [October 2, 2007, 6:23pm UTC](https://www.ruby-forum.com/t/working-rubygems-on-windows/116034/9 "2007-10-02T18:23:04Z")

</div>

On Oct 2, 2007, at 08:03 , Trans wrote:

> I don’t know what to tell you then. It’s not working for me. I just  
> removed everything and tried again. I downloaded the OneClickInstaller  
> from [ruby-lang.org](http://ruby-lang.org) ([http://rubyforge.org/frs/download.php/18566/](http://rubyforge.org/frs/download.php/18566/)  
> ruby186-25.exe). Installed it. And then did:
> 
> C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
> rubyscript2exe  
> ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)  
> getaddrinfo: no address associated with hostname.(SocketError)

I can not fix your inability to resolve the address of a hostname  
with any change to RubyGems. I gave you a command to run that would  
give me what you were trying to connect to in [ruby-talk:271292], and  
you never responded with the output.

> C:\Documents and Settings\Milton\My Documents\Tom\>gem install  
> rubyscript2exe --no-http-proxy  
> ERROR: While executing gem … (NoMethodError)  
> undefined method `[]=’ for #Gem::ConfigFile:0x2df7864
> 
> C:\Documents and Settings\Milton\My Documents\Tom\>gem --version  
> 0.9.2

I asked you if you were using a proxy server in [ruby-talk:271292]  
and you never answered that question either.

I have tried to help you, but you have not responded to my requests  
for information. Go back to [ruby-talk:271292] and reply to that  
email with the information I’ve requested. I can not help you  
without it.
