# Which C compiler for gem (windows vista)

**URL:** <https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555>\
**Category:** Ruby\
**Created:** [August 11, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555 "2008-08-11T15:28:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/1 "2008-08-11T15:28:55Z")

</div>

Hello,

I am still having the problem, that my gem update is not working  
correctely and aparently this is related to a missing c-compiler or at  
least stdio.h ( [Gem (update ?) problem - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/162379#new) )

Is there a downloadable c-compiler to put into the ruby path ?

I do have MS Visual Studio installed on my main computer (where I now  
installed ruby and rails as well - but still the same problem as  
mentioned before), which should have a c-compiler, but I don’t know how  
to make it available for gem.

Any suggestions are very much appreciated.

Best

Peter

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/2 "2008-08-11T15:41:34Z")

</div>

On Mon, Aug 11, 2008 at 15:26, Peter K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> mentioned before), which should have a c-compiler, but I don’t know how  
> to make it available for gem.
> 
> Any suggestions are very much appreciated.

1. you need ms vc 6.0.
2. prior to calling gem install, call vcvars32.bat that will set  
environment for compilation  
alternatively, search the archive (ruby-forum is just a mirror of  
ruby-talk mailing list, so google for “ruby-talk gem windows compiler”  
or similar might be useful)

Jano

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 4:43pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/3 "2008-08-11T16:43:58Z")

</div>

Jano S. wrote:

> 1. you need ms vc 6.0.
> 2. prior to calling gem install, call vcvars32.bat that will set  
> environment for compilation  
> alternatively, search the archive (ruby-forum is just a mirror of  
> ruby-talk mailing list, so google for “ruby-talk gem windows compiler”  
> or similar might be useful)
> 
> Jano

Thanks a lot, Jano !!

would I just type vcvars.bat in the console (and hit enter) ?

(presumably with the path to vcvars.bat)

and is vcvars.bat part of ms vc 6.0 ( I still have to find it somewhere  
for download)

thanks a lot for your great help !!

Best

Peter

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/4 "2008-08-11T19:20:19Z")

</div>

Peter K. wrote:

> Hello,
> 
> I am still having the problem, that my gem update is not working  
> correctely and aparently this is related to a missing c-compiler or at  
> least stdio.h ( [Gem (update ?) problem - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/162379#new) )
> 
> Is there a downloadable c-compiler to put into the ruby path ?
> 
> I do have MS Visual Studio installed on my main computer (where I now  
> installed ruby and rails as well - but still the same problem as  
> mentioned before), which should have a c-compiler, but I don’t know how  
> to make it available for gem.
> 
> Any suggestions are very much appreciated.
> 
> Best
> 
> Peter

You could go the mingw compiler route, as well.

> **[Still playing with Ruby on Windows | AkitaOnRails.com](https://www.akitaonrails.com/2008/7/26/still-playing-with-ruby-on-windows)**
>
> Leitores brasileiros: cliquem aqui
> A week ago I’ve tested the newest One-Click Ruby Installer build and found a few minor glitches. Since then I’ve...

has a link in itself to  
ruby\_devkit-186-p279  
which appears to have a ruby install with a built in devkit.  
-R

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 7:41pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/5 "2008-08-11T19:41:28Z")

</div>

On Monday 11 August 2008 10:17:58 Roger P. wrote:

> > installed ruby and rails as well - but still the same problem as  
> > [Still playing with Ruby on Windows | AkitaOnRails.com](http://www.akitaonrails.com/2008/7/26/still-playing-with-ruby-on-windows)  
> > has a link in itself to  
> > ruby\_devkit-186-p279  
> > which appears to have a ruby install with a built in devkit.  
> > -R

I have the same problem even though VC6 is installed. There seems to be  
a  
pathing error in the install script. THe path it looks for seems to be a  
unix  
path . The install does not deal properly with spaces.

David

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/6 "2008-08-11T21:38:16Z")

</div>

David S. wrote:

> On Monday 11 August 2008 10:17:58 Roger P. wrote:
> 
> > > installed ruby and rails as well - but still the same problem as  
> > > [Still playing with Ruby on Windows | AkitaOnRails.com](http://www.akitaonrails.com/2008/7/26/still-playing-with-ruby-on-windows)  
> > > has a link in itself to  
> > > ruby\_devkit-186-p279  
> > > which appears to have a ruby install with a built in devkit.  
> > > -R
> 
> I have the same problem even though VC6 is installed. There seems to be  
> a  
> pathing error in the install script. THe path it looks for seems to be a  
> unix  
> path . The install does not deal properly with spaces.
> 
> David

Hi David,

that is bad news - as I was hoping to at least have an option with VC6.  
Did you use the above mentioned vcvars.bat command ?

Best

Peter

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 9:33pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/7 "2008-08-11T21:33:20Z")

</div>

Hi Roger,

thanks a lot for the hint !!

Do you have any experience with that kit ?

I am sometimes reading that MS VC 6.0 has problems - is that regarging  
gems ? Or is it only regarding the size of compiled programms (in which  
case I probably don’t have a problem, as I would only use it for native  
gems installation).

Are there any pay-offs using ruby\_devkit-186-p279 ?

(By the way, it seems difficult to get MS VC 6.0 - or do you have an  
idea where to get it ?)

thanks again for your great help

Best

Peter

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/8 "2008-08-11T23:17:50Z")

</div>

Dear Peter,

> (By the way, it seems difficult to get MS VC 6.0 - or do you have an  
> idea where to get it ?)

a good place to look is computing books in college/university  
libraries…  
I managed to get a [German language] book with CD right in my hometown.  
Try this catalogue for a search over many libraries:

[http://www.ubka.uni-karlsruhe.de/kvk/kvk/kvk\_en.html](http://www.ubka.uni-karlsruhe.de/kvk/kvk/kvk_en.html)

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 11, 2008, 9:45pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/9 "2008-08-11T21:45:07Z")

</div>

Peter K. wrote:

> Hi Roger,
> 
> thanks a lot for the hint !!
> 
> Do you have any experience with that kit ?
> 
> I am sometimes reading that MS VC 6.0 has problems - is that regarging  
> gems ? Or is it only regarding the size of compiled programms (in which  
> case I probably don’t have a problem, as I would only use it for native  
> gems installation).

I’m not aware of any problems with it, per se.  
With regard to this error, it appears that it’s a bug in hpricot’s  
latest version, itself–it is missing some quotes in there or  
something–so it won’t compile if your compiler is within a directory  
that contains spaces. So overcome this by hacking it to make it work or  
moving your compiler to a directory without spaces or installing an  
older version of that gem which comes with a precompiled binary [in  
which case gem update wouldn’t work for it]. Or installing a new  
compiler in a directories without spaces.

> Are there any pay-offs using ruby\_devkit-186-p279 ?

It is rumored to be faster which is the real reason I use it. It’s not  
dog slow. The pay off is that it’s easy to install a compiler, that’s  
about all I can think of. If you do use it then some precompiled binary  
gems MIGHT not work, though–see the web site and its comments. If you  
download a gem that comes with a precompiled binary then that binary  
needs to have been compiled with the same compiler that compiled your  
ruby [in this case mingw] or it might not work. Then again it might.

> (By the way, it seems difficult to get MS VC 6.0 - or do you have an  
> idea where to get it ?)

I haven’t ever tried so I’m not sure.  
GL.  
-R

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 14, 2008, 11:53pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/10 "2008-08-14T23:53:57Z")

</div>

Thanks a lot Axel !

---

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [August 15, 2008, 8:00pm UTC](https://www.ruby-forum.com/t/which-c-compiler-for-gem-windows-vista/145555/11 "2008-08-15T20:00:48Z")

</div>

Hi Axel, Roger, David, Jano …,

I finally managed to get Visual C 6.0, but now it does not install in  
Vista.

Does anybody know how to install it, so that gem would finally work ?

Thanks in advance

Peter
