Problem with set up after Windows' build

Hello everyone,

I would like to start doing some lower level development with Ruby, so
I started by building Ruby 1.8.5 under windows using Visual-C 8.

That went smoothly, so my first test after installing Ruby was to
install Gems, so that I could add some packages I need. That also
seemed to work, until I tried running “gem”.

Any invocation of gem returns the following errors:

C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- zlib (LoadError) from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:9
from
C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:7
from
C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:93:in
`manage_gems’

    from C:/usr/local/bin/gem:10

I tried uncommenting zlib in ruby-1.8.5/ext/Setup.nt and rebuilding
from scratch (after “nmake clean”), but that made no difference, and I
could see no sign that zlib was actually built.

What step am I missing? Also I wonder what’s the right way to add an
extention to a build under Windows/Visual C-8.

And thanks, in advance, to everyone for their help.

Josh S.

On 10/15/06, Josh S. [email protected] wrote:

What step am I missing? Also I wonder what’s the right way to add an
extention to a build under Windows/Visual C-8.

And thanks, in advance, to everyone for their help.

Don’t try.

It’s not a good approach right now. VS8 has a number of changes that
affects how Ruby runs. To get this to work properly, you will need to
build your own custom version of zlib as well as manually building the
zlib extension.

-austin

I just tried a few more things that weren’t sufficient to get this
working, one of which was copying zlib1.dll from the one-click install
version of Ruby 1.8.5.

I suppose I can substitute that for building a custom version of zlib
(I hope).

“…as well as manually building the zlib extension.”

How do I manually build the zlib extention to get it recognized?

I notice that the 1 click install version of 1.8.5 doesn’t seem to have
any directories or files named after zlib, so I guess that the
reference must somehow be compiled into ruby.exe proper. Is that right?

On 10/15/06, Josh S. [email protected] wrote:

I just tried a few more things that weren’t sufficient to get this
working, one of which was copying zlib1.dll from the one-click install
version of Ruby 1.8.5.

I suppose I can substitute that for building a custom version of zlib
(I hope).

You can’t. They’re built with different compilers.

“…as well as manually building the zlib extension.”

How do I manually build the zlib extention to get it recognized?

The same way you would with any normal extension: you go to the
directory where it exists and run “ruby extconf.rb” and then build
from that, IIRC.

I notice that the 1 click install version of 1.8.5 doesn’t seem to have
any directories or files named after zlib, so I guess that the
reference must somehow be compiled into ruby.exe proper. Is that right?

Um. I don’t have 1.8.5 on my work machine, but if you look in
Ruby/lib/ruby/site_ruby/i386_msvcrt you will see a zlib.so there, I
think.

-austin

Would this go smoother if I built with a different compiler? I do have
MSYS/MingW installed.

Oops ignore that last sentence. It had scrolled off the bottom of the
google post window and I forgot to delete it.

Also, trying to follow an MSYS build with a Microsoft install doesn’t
fix the install problem. Apparently the MSYS build process must write
an install script that isn’t compatible with nmake.

Josh S. wrote:

files.

I have no idea why “make install” is failing.

A search shows that I’m not the first one to have this problem, though
no solution was found before.

Someone suggested using cygwin.

I tried running “make install” in cygwin after building with MSYS.

The first few install lines worked, then the mass of them failed
silently.

So I’m still left wondering what’s wrong.

Austin Z. wrote:

On 10/15/06, Josh S. [email protected] wrote:

I just tried a few more things that weren’t sufficient to get this
working, one of which was copying zlib1.dll from the one-click install
version of Ruby 1.8.5.

I suppose I can substitute that for building a custom version of zlib
(I hope).

You can’t. They’re built with different compilers.

I just tried rebuilding with MSYS/MingW.

It built, it passed “make test”, but then there was a problem.

“make install” echoed the commands, but no directories were made and no
files copied.

I tried the “mkdir” commands by hand, and that did make the
directories. But running “make install again” didn’t actually copy the
files.

I have no idea why “make install” is failing.

Would this go smoother if I built with a different compiler? I do have
MSYS/MingW installed.

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