Annoying problem: gems tries to build native extension

M

marcel.luethi

Hi All,

I have an annoying problem using gems.
Yesterday I wanted to update all my gems to their latest version.
For hpricot unfortunately I answered the question "Select which gem to
install for your platform (i386-mswin32)" with "1" -> hpricot-0.6.16
(ruby)
I knew immediately this was wrong...
It tried to build the native extension but I don't have any VC
compiler installed therefore it stopped updating the gems.

I cleaned hpricot-0.6.161 from gems\1.8\cache\, gems\1.8\specifications
\ & gems\1.8\gems\
That didn't help, still the same:

C:\ruby>gem update
Updating installed gems
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


Because it installed not correctly "gem list --local" shows "hpricot
(0.6)" and therefore uninstalling doesn't work:

C:\ruby>gem uninstall hpricot -v '0.6.161'
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem hpricot = 0.6.161


I uninstalled Ruby totally and reinstalled it from scratch - but the
problem is still the same!
Here is my environment:

C:\ruby>gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.2.0
- RUBY VERSION: 1.8.7 (2008-05-31 patchlevel 0) [i386-mswin32]
- INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
- RUBY EXECUTABLE: c:/ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: c:/ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mswin32-60
- GEM PATHS:
- c:/ruby/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/


Does anybody know why it still tries to install this hpricot-0.6.161
(ruby)?
Is there somewhere a cache (outside of the Ruby dir) from which it is
loaded?
Any help is highly appreciated!

Thanks!

Marcel
 
D

Damjan Rems

Hi All,

I have an annoying problem using gems.


I too have problem which is probably related. When installing
sqlite3-ruby:
-------------------------
C:\gem install sqlite3-ruby --no-rdoc --no-ri
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.

d:/ruby_186_287/bin/ruby.exe extconf.rb install sqlite3-ruby --no-rdoc
--no-ri
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
d:/ruby_186_287/lib/ruby/gems/1.8/gems/sqlite
3-ruby-1.2.4 for inspection.
Results logged to
d:/ruby_186_287/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/
sqlite3_api/gem_make.out
---------------------------

I think nmake should't be used on windows platform since compiler is
usually not present and gems are precompiled.


However:
---------------------------
c:\gem install --version 1.2.3 sqlite3-ruby --no-rdoc --no-ri
Successfully installed sqlite3-ruby-1.2.3-x86-mswin32
1 gem installed
---------------------------

RubyGems is 1.2.0 fresh install from One-Click Ruby Installer 186-27
RC1. OS is Windows 2003 R2 SP2.


by
TheR
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top