Problem installing win32-api gem on Windows

M

Mike G.

I'm behind a firewall that prevents me from just doing
gem install <whatever>

So I downloaded the zip file for win32-api-1.0.4 (I know, it's an old
version, but it runs with our existing software--later versions changed
the api).

I installed mingw on the windows target machine.

I got past numerous problems and persuaded it to build api.o from api.c
and then api.so from api.o. But now when I do
gem install win32-api-1.0.4.gem
it complains all over again that it can't find api.so.

It's opaque to me what I need to do to finish the installation.

Can anyone offer a suggestion?

Thanks,
--Mike
 
J

Jeremy Bopp

I'm behind a firewall that prevents me from just doing
gem install <whatever>

So I downloaded the zip file for win32-api-1.0.4 (I know, it's an old
version, but it runs with our existing software--later versions changed
the api).

I installed mingw on the windows target machine.

I got past numerous problems and persuaded it to build api.o from api.c
and then api.so from api.o. But now when I do
gem install win32-api-1.0.4.gem
it complains all over again that it can't find api.so.

It's opaque to me what I need to do to finish the installation.

Can anyone offer a suggestion?

I can't offer a suggestion for your build problems, but have you tried
downloading the gem itself manually the same way you did for the source
code zip file and then have gem install that? One of these links should
get you what you need:

http://rubygems.org/downloads/win32-api-1.0.4-mswin32.gem
http://rubygems.org/downloads/win32-api-1.0.4-x86-mswin32-60.gem

Then, assuming you used the first link, simply run:

gem install win32-api-1.0.4-mswin32.gem


-Jeremy
 
M

Mike G.

I can't offer a suggestion for your build problems, but have you tried
downloading the gem itself manually the same way you did for the source
code zip file and then have gem install that? One of these links should
get you what you need:

http://rubygems.org/downloads/win32-api-1.0.4-mswin32.gem
http://rubygems.org/downloads/win32-api-1.0.4-x86-...

Then, assuming you used the first link, simply run:

gem install win32-api-1.0.4-mswin32.gem



Thanks, Jeremy. That took care of my problem.

I didn't know about those downloads.

--Mike
 
J

Jeremy Bopp

Thanks, Jeremy. That took care of my problem.

I didn't know about those downloads.

No problem. The rubygems.org site is pretty handy.

I'm curious, are you using a proxy or something to get around the
firewall in order to manually download the gem file? If so, you should
be able to tell gem to use that same proxy directly (see the -p option)
and save yourself some hassle in the future. This workaround would have
been painful if the gem had had any dependencies of significance.

-Jeremy
 
L

Luis Lavena

I'm behind a firewall that prevents me from just doing
   gem install <whatever>

gem help install

see --http-proxy and provide that during gem installation or set the
HTTP_PROXY environment variable.

gem install xxx --http-proxy http://firewallserver:port
So I downloaded the zip file for win32-api-1.0.4 (I know, it's an old
version, but it runs with our existing software--later versions changed
the api).

I installed mingw on the windows target machine.

You didn't say which version of Ruby you're trying to compile win32-
api for, so I assume is RubyInstaller and you installed the DevKit.
I got past numerous problems and persuaded it to build api.o from api.c
and then api.so from api.o.  But now when I do
    gem install win32-api-1.0.4.gem
it complains all over again that it can't find api.so.

All that could have been avoided, download win32-api gem and with
RubyInstaller + DevKit you can issue:

gem install --local win32-api-1.0.4.gem

But, we need more information on which version of Ruby you're talking
about. Preferably the output of "gem env"

Saying this because win32-api pre-compiled gems do not include support
for Ruby 1.9 (if that is your Ruby installation).
 
D

Daniel Berger

I'm behind a firewall that prevents me from just doing
gem install<whatever>

So I downloaded the zip file for win32-api-1.0.4 (I know, it's an old
version, but it runs with our existing software--later versions changed
the api).

The API didn't really change, just the behavior with regards to $KCODE
and ANSI vs Wide character functions. However, that change was undone in
1.4.x because it was too problematic in practice.

Have you tried using the latest version to see if it's compatible?

Regards,

Dan
 

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,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top