Failed to build gem native extension

B

Ben Bb

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 ?
 
A

Alex Fenton

Ben said:
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/installer3/

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
 
B

Ben Bb

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,690
Latest member
MacGyver

Latest Threads

Top