Gem Update issues

O.k., I'm running an XP SP3 box and have installed ruby 186-26 and gems
1.1.1 (Had to ditch 1.2, because I kept getting errors with it)

Anyways, funny story goes like this:

I can't do this:
C:\WebSite\N2N>gem update
Updating installed gems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Updating hpricot
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb update
checking for stdio.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --srcdir=.
        --curdir
        --ruby=c:/ruby/bin/ruby

Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.16
1 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161/ext/fast_xs/gem
_make.out

BUT, I can do this:
C:\WebSite\N2N>gem update --system
Updating RubyGems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Nothing to update

And, I successfully used gem install, to install Watir.

My current issue, is trying to install sqlit3-ruby... It just doesn't
want to do it, and I've already added the 3 required files to the bin
directory.

Any ideas!? I'm familiar with stdio.h, as it's the input/output header
for C - is it not a default header/include in windows? (Especially with
.NET and Visual Studio installed) Or does the stdio.h have to be located
in another ruby/gem dependent directory?

Thanx!

John Bailey wrote:

O.k., I'm running an XP SP3 box and have installed ruby 186-26 and gems
1.1.1 (Had to ditch 1.2, because I kept getting errors with it)

Anyways, funny story goes like this:

I can't do this:
C:\WebSite\N2N>gem update
Updating installed gems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Updating hpricot
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb update
checking for stdio.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --srcdir=.
        --curdir
        --ruby=c:/ruby/bin/ruby

Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.16
1 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161/ext/fast_xs/gem
_make.out

BUT, I can do this:
C:\WebSite\N2N>gem update --system
Updating RubyGems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Nothing to update

And, I successfully used gem install, to install Watir.

My current issue, is trying to install sqlit3-ruby... It just doesn't
want to do it, and I've already added the 3 required files to the bin
directory.

Any ideas!? I'm familiar with stdio.h, as it's the input/output header
for C - is it not a default header/include in windows? (Especially with
.NET and Visual Studio installed) Or does the stdio.h have to be located
in another ruby/gem dependent directory?

Thanx!

Sorry, forgot to include error dump from sqlite3 install:

C:\>gem install sqlite3-ruby
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
        ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby
checking for fdatasync() in rt.lib... no
checking for sqlite3.h... no

nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1
.2.4 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_
api/gem_make.out

So, I'm missing:
nmake
stdio.h
fdatasync in rt.lib

I have VS C++ 2008 Express installed, so that negates the pretense of
not having a C compiler installed. Nmake, I'm going to d/l from
microsoft, but I doubt that that will find a resolution to these issues.

John Bailey wrote:

Sorry, forgot to include error dump from sqlite3 install:

C:\>gem install sqlite3-ruby
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
        ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby
checking for fdatasync() in rt.lib... no
checking for sqlite3.h... no

nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1
.2.4 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_
api/gem_make.out

So, I'm missing:
nmake
stdio.h
fdatasync in rt.lib

I have VS C++ 2008 Express installed, so that negates the pretense of
not having a C compiler installed. Nmake, I'm going to d/l from
microsoft, but I doubt that that will find a resolution to these issues.

O.k., so I d/l nmake from Micro$haft and all I get is a Zlib Buffer
error...
I don't even get to the stdio.h issue, anymore. Any ideas?

John Bailey wrote:

Sorry, forgot to include error dump from sqlite3 install:

C:\>gem install sqlite3-ruby
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
       ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby
checking for fdatasync() in rt.lib... no
checking for sqlite3.h... no

nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1
.2.4 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_
api/gem_make.out

So, I'm missing:
nmake
stdio.h
fdatasync in rt.lib

I have VS C++ 2008 Express installed, so that negates the pretense of
not having a C compiler installed. Nmake, I'm going to d/l from
microsoft, but I doubt that that will find a resolution to these
issues.

O.k., so I d/l nmake from Micro$haft and all I get is a Zlib Buffer
error...
I don't even get to the stdio.h issue, anymore. Any ideas?
--

For things to work nicely you need the c compiler used to build ruby,
which for the standard ruby installed is visual c 6. You also need the
headers and so pm for sqlite3 (which you can get off the sqlite3
website)
Fred

John Bailey wrote:

Sorry, forgot to include error dump from sqlite3 install:

C:\>gem install sqlite3-ruby
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
      ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby
checking for fdatasync() in rt.lib... no
checking for sqlite3.h... no

nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1
.2.4 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_
api/gem_make.out

So, I'm missing:
nmake
stdio.h
fdatasync in rt.lib

I have VS C++ 2008 Express installed, so that negates the pretense
of
not having a C compiler installed. Nmake, I'm going to d/l from
microsoft, but I doubt that that will find a resolution to these
issues.

O.k., so I d/l nmake from Micro$haft and all I get is a Zlib Buffer
error...
I don't even get to the stdio.h issue, anymore. Any ideas?
--

For things to work nicely you need the c compiler used to build
ruby, which for the standard ruby installed is visual c 6. You also
need the headers and so pm for sqlite3 (which you can get off the
sqlite3 website)
Fred

Oh you should also be able to get prebuilt gems. Installing them one
at a time might help

Fred

Frederick Cheung wrote:

Building native extensions. This could take a while...

So, I'm missing:

O.k., so I d/l nmake from Micro$haft and all I get is a Zlib Buffer
error...
I don't even get to the stdio.h issue, anymore. Any ideas?
--

For things to work nicely you need the c compiler used to build
ruby, which for the standard ruby installed is visual c 6. You also
need the headers and so pm for sqlite3 (which you can get off the
sqlite3 website)
Fred

Oh you should also be able to get prebuilt gems. Installing them one
at a time might help

Fred

Yes, I can install pre-built gems, and have installed these:
Watir
RSpec

..but if I want to make sure they're updated, I run into numerous
errors.

After a search for stdio.h, I find it in:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include

So, I *do* have the include header file, I'm just unsure as to where
ruby *requires* it to be. There shouldn't be that much of a dramatic
difference between VC6 and VC9 header files (though, I could be wrong,
with revision updates/method changes) - but I *do* have the file...
...which brings me back to my original problem:

How do I fix the issue, without *having* to install VC 6? And how can I
address the other issue of the Zlib error, after upgrading to rails 1.2
or dropping nmaker into the ruby bin? (Both of these reproduce the Zlib
error... ...rails 1.1.1 works fine, save for the stdio.h error)

John Bailey wrote:

C:\>gem install watir
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed win32-api-1.2.0-x86-mswin32-60
Successfully installed windows-api-0.2.4
Successfully installed windows-pr-0.9.3
Successfully installed win32-process-0.5.9
Successfully installed watir-1.5.6
5 gems installed
Installing ri documentation for win32-api-1.2.0-x86-mswin32-60...
Installing ri documentation for windows-api-0.2.4...
Installing ri documentation for windows-pr-0.9.3...
Installing ri documentation for win32-process-0.5.9...
Installing ri documentation for watir-1.5.6...
Installing RDoc documentation for win32-api-1.2.0-x86-mswin32-60...
Installing RDoc documentation for windows-api-0.2.4...
Installing RDoc documentation for windows-pr-0.9.3...
Installing RDoc documentation for win32-process-0.5.9...
Installing RDoc documentation for watir-1.5.6...

C:\>gem install sqlite3-ruby
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
        ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby
checking for fdatasync() in rt.lib... no
checking for sqlite3.h... no

nmake

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'ruby.h'
Stop.

Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1
.2.4 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_
api/gem_make.out

Is the header (sqlite3.h) a fourth required file, now!? And how to I
update the rt.lib to reflect fdatasync()? And why is it trying to make a
new ruby header - shouldn't it exist, already!?

John Bailey wrote:

C:\>gem update rt.lib
Updating installed gems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Nothing to update

So, I get an error for something not being in rt.lib, but gem update
tells me that rt.lib is the freshest package on the block... wtf!?

I know it seems a bit redundant, me asking these questions, but I *have*
used my good 'ole friend Google, to no avail. :frowning:

Here's the dump, from the local query:

C:\>gem query --local

*** LOCAL GEMS ***

actionmailer (2.1.1)
actionpack (2.1.1)
activerecord (2.1.1)
activeresource (2.1.1)
activesupport (2.1.1)
fxri (0.3.6)
fxruby (1.6.12)
hpricot (0.6)
log4r (1.0.5)
rails (2.1.1)
rake (0.8.2, 0.7.3)
rspec (1.1.4)
sources (0.0.1)
watir (1.5.6)
win32-api (1.2.0, 1.0.4)
win32-clipboard (0.4.3)
win32-dir (0.3.2)
win32-eventlog (0.4.6)
win32-file (0.5.4)
win32-file-stat (1.2.7)
win32-process (0.5.9, 0.5.3)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4, 0.2.0)
windows-pr (0.9.3, 0.7.2)

Here's the result from the cleanup, with dry-run option:

C:\>gem cleanup -d
Cleaning up installed gems...
Dry Run Mode: Would uninstall rake-0.7.3
Dry Run Mode: Would uninstall win32-process-0.5.3
Dry Run Mode: Would uninstall windows-pr-0.7.2
Dry Run Mode: Would uninstall windows-api-0.2.0
Dry Run Mode: Would uninstall win32-api-1.0.4-x86-mswin32
Clean Up Complete

*This one confuses me, since those packages are for Watir, and I
*believe* that RSpec is dependent on those packages. I could be wrong,
though, wouldn't be the first time.

See, I need Sqlite3, Watir and RSpec to all be installed. The other
packages, I could really care less about, but being an avid coder: I
understand the necessity for having the recent/updated packages.

So, how can I address this, without the default answers/no0b answers?

The general/FAQ answers, I've already tried... ...it's why I
aforementioned already having Visual Studio C++ 2008 Express installed;
I knew that having a C compiler would come up... ...and I've had to
illustrate that I already have one installed and that the 'stdio.h'
*does* exist, within the system.

I also used the gem update dump to illustrate that gem is telling me
that I don't *need* to update rt.lib, even though it's missing a method
reference. Will I have to hand code this method reference, in the
rt.lib?

Is there another gem package that I *should* have, but I'm unaware of
it's dependency? (I typically use the --include-dependencies flag, but
given that these types of errors are being generated, a dependency could
not be flagged - that I actually need.)

Thanks for the help!

John Bailey wrote:

C:\>gem update rt.lib
Updating installed gems
Bulk updating Gem source index for:http://gems.rubyforge.org/
Nothing to update

So, I get an error for something not being in rt.lib, but gem update
tells me that rt.lib is the freshest package on the block... wtf!?

rt.lib, whatever it is, isn't a gem so trying to gem update it does
nothing.

*This one confuses me, since those packages are for Watir, and I
*believe* that RSpec is dependent on those packages. I could be wrong,
though, wouldn't be the first time.

That's normal: it's telling you that you've got multiple versions of
those packages are installed and that it would just go ahead and
remove the old versions.

The general/FAQ answers, I've already tried... ...it's why I
aforementioned already having Visual Studio C++ 2008 Express installed;
I knew that having a C compiler would come up... ...and I've had to
illustrate that I already have one installed and that the 'stdio.h'
*does* exist, within the system.

It's more complicated than that: if the extensions isn't built with
the version that was used to build ruby then nothing good will happen.
You probably also need to play with vcvars32.bar (which sets the
appropriate environment variables for where the compiler is and all
that sort of thing (http://msdn.microsoft.com/en-us/library/
f2ccy3wt(VS.80).aspx)

But anyway, you shouldn't need to do all that.
http://blog.muse.net.nz/2008/09/07/setup-rails-on-windows-to-use-sqlite3/
suggests there's an easy way to get the prebuilt sqlite3 packages.

Fred

Forgot to say - I do recommend you update to 1.2 - it's really a lot
faster when installing/updating packages. You say you got errors with
it but 1.1.1. doesn't seem to be giving you much love either.

Fred

John,

Building gems in Windows is a pain. There is no "make/nmake" command.
You also have all these compiler issues described by Fred above. I
always use pre-built...

Cheers, Sazima

Sazima wrote:

John,

Building gems in Windows is a pain. There is no "make/nmake" command.
You also have all these compiler issues described by Fred above. I
always use pre-built...

Cheers, Sazima

On Sep 20, 11:14�pm, John Bailey <rails-mailing-l...@andreas-s.net>

Which is great.. except the sqlite3-ruby gem has been updated to 1.2.4..
but not the mswin32 pre-built version! So now doing a 'gem update' will
blow up with the above errors! I've asked about getting 1.2.4 mswin
version, but no answer so far. I wouldn't mind staying at 1.2.3, but I
can't do an update without it dying partway through on sqlite3-ruby.

If anyone knows of a way to have 'gem update' either skip a certain gem,
or continue updating the rest after such an error, please let me know!

Thanks,

jt

John T. wrote:

If anyone knows of a way to have 'gem update' either skip a certain gem,
or continue updating the rest after such an error, please let me know!

hi, i have encountered a similar problem - using the gem update command
and exiting in the middle of the update because i could not find some
stupid stdio.h file (this specifically pertains to hpricot).

anyway, i found out that you can skip a certain gem by renaming the gem
specification file for the specific gem that you want to skip.

in my case, i do not want to include hpricot in the gem update command
so

i go to this directory: C:\Ruby\lib\ruby\gems\1.8\specifications

and look for this file: hpricot-0.6-x86-mswin32.gemspec

then rename it to: hpricot-0.6-x86-mswin32.gemspec.bak

when i run gem update in my computer, it skips hpricot and on my WinXP
XP2 machine, there is nothing left to update when i use the gem update
command:

C:\Ruby>gem update
Updating installed gems
Nothing to update

and now, i can just manually update hpricot using this command:

gem install hpricot --source http://code.whytheluckystiff.net

and then rename this file again: hpricot-0.6-x86-mswin32.gemspec

i hope this helps your problem.