Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Failed to build gem native extension
Ben Bb
2/8/2009 10:10:00 PM
Hi,
I want to install juggernaut but when running "gem install juggernaut" I
get the following error:
ERROR: Failed to build gem native extension.
It seems that it don't find 'windows.h'.
I installed ruby with the One-Click installer (i386-mswin32 version) but
I have only MinGW as a C/C++ compiler.
Juggernaut does not provide a precompiled build so how can I do if I
want to install it ?
Can I compile gem native extension with MinGW if I have install ruby
with the one click installer ?
--
Posted via
http://www.ruby-...
.
2 Answers
Alex Fenton
2/9/2009 2:43:00 AM
0
Ben Bb wrote:
> I want to install juggernaut but when running "gem install juggernaut" I
> get the following error:
>
> ERROR: Failed to build gem native extension.
>
> It seems that it don't find 'windows.h'.
>
> I installed ruby with the One-Click installer (i386-mswin32 version) but
> I have only MinGW as a C/C++ compiler.
>
> Can I compile gem native extension with MinGW if I have install ruby
> with the one click installer ?
No, not really. Ruby stores information about how it itself was
compiled, and uses this information to compile extensions. For example,
if Ruby was compiled using 'cl.exe' (Microsoft's MSVC, used for the
current one-click installer), it will always try to build extensions
using 'cl', not 'gcc' (the name of the MingW compiler).
> Juggernaut does not provide a precompiled build so how can I do if I
> want to install it ?
Either
1) Get or build a MingW ruby, then install juggernaut to this ruby.
There are precompiled binaries available for MingW, for example, here:
http://dump.mmediasys.com/i...
2) Install the same Microsoft compiler used to build the OCI. This is
MSVC 6.0 (although practically, I've used MSVC 7.1 without difficulties).
Microsoft has helpfully decided not offer these for download any more,
but they are not hard to get hold of (on CDs with programming books, or
perhaps, one might imagine, via some P2P file distribution network... )
I would go for 1), as you'll get a faster ruby with MingW than very old
MSVC, and MSVC is clumsy as a command-line compiler b/c the default
Windows shell is rubbish.
I've seen some ways suggested of hacking the OCI configuration to use
MingW as a compiler, but this seems to me messy and error-prone.
alex
Ben Bb
2/9/2009 2:56:00 PM
0
Thanks but I still couldn't install juggernaut with mingw (gem install
eventmachine failed).
I reinstalled ruby-mswin32 and VC++ 6.0 and it worked fine :)
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Failed to build gem native extension
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password