Problem installing win32-api gem on Windows

I’m behind a firewall that prevents me from just doing
gem install

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

On 10/27/2010 3:19 PM, Mike G. wrote:

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

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

On 10/27/2010 3:49 PM, Mike G. wrote:

gem install win32-api-1.0.4-mswin32.gem

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

On 10/27/10 2:19 PM, Mike G. wrote:

I’m behind a firewall that prevents me from just doing
gem install

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

On Oct 27, 5:19pm, “Mike G.” [email protected] wrote:

I’m behind a firewall that prevents me from just doing
gem install

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs