Error While Install Gem

N

Nabs Kahn

I am trying to install Mechanize on a WinXP machine, and I am getting
this error:

ERROR: Failed to build gem native extension

ruby extconf.rb install mechanize
extconf.rb:3:in ``': No such file or directory - uname -p
(Errno::ENOENT) from extconf.rb:3

Googling results only in solutions for linux distros... on linux the
problem is that the ruby development libraries are not installed, where
am I supposed to find these for Windows? On OS X i would have typed sudo
apt-get dev-1.8 or something, but what do I do on WinXP?
 
E

Eric Hodel

I am trying to install Mechanize on a WinXP machine, and I am getting
this error:

ERROR: Failed to build gem native extension

ruby extconf.rb install mechanize
extconf.rb:3:in ``': No such file or directory - uname -p
(Errno::ENOENT) from extconf.rb:3

What was the full error?
 
N

Nabs Kahn

Eric said:
What was the full error?

C:\Documents and Settings\Nabs>gem install mechanize
Install required dependency nokogiri? [Yn] y
Select which gem to install for your platform (i386-mswin32)
1. nokogiri 1.3.0 (x86-mingw32)
2. nokogiri 1.3.0 (x86-mswin32)
3. nokogiri 1.3.0 (java)
4. nokogiri 1.3.0 (ruby)
5. Skip this gem
6. Cancel installation
Install required dependency racc? [Yn] y
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mechanize
extconf.rb:3:in ``': No such file or directory - uname -p
(Errno::ENOENT)
from extconf.rb:3


Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6 for
inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6/ext/racc/cparse/gem_
make.out
 
E

Eric Hodel

Eric said:
What was the full error?

C:\Documents and Settings\Nabs>gem install mechanize
Install required dependency nokogiri? [Yn] y
Select which gem to install for your platform (i386-mswin32)
1. nokogiri 1.3.0 (x86-mingw32)
2. nokogiri 1.3.0 (x86-mswin32)
3. nokogiri 1.3.0 (java)
4. nokogiri 1.3.0 (ruby)
5. Skip this gem
6. Cancel installation

I think this went away with RubyGems 0.9.5
Install required dependency racc? [Yn] y

As did this.
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mechanize
extconf.rb:3:in ``': No such file or directory - uname -p
(Errno::ENOENT)
from extconf.rb:3


Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6 for
inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6/ext/racc/cparse/gem_
make.out

I suspect that either your ruby or your RubyGems versions are too old
and you should upgrade. Currently RubyGems is at 1.3.4

What do:

ruby -v

and

gem env

say?
 
N

Nabs Kahn

Eric said:
4. nokogiri 1.3.0 (ruby)
5. Skip this gem
6. Cancel installation

I think this went away with RubyGems 0.9.5
Install required dependency racc? [Yn] y

As did this.
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6 for
inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6/ext/racc/cparse/gem_
make.out

I suspect that either your ruby or your RubyGems versions are too old
and you should upgrade. Currently RubyGems is at 1.3.4

What do:

ruby -v

and

gem env

say?

C:\Documents and Settings\Nabs>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\Documents and Settings\Nabs>gem env
RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
- GEM PATH:
- c:/ruby/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org

C:\Documents and Settings\Nabs>
 
N

Nabs Kahn

Yup, that solved it, thanks. What is weird is that the
one-click-installer puts such an old version of RubyGems.

Thanks,

Nabs
 
E

Eric Hodel

C:\Documents and Settings\Nabs>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

Yup, that solved it, thanks. What is weird is that the
one-click-installer puts such an old version of RubyGems.

The latest one-click is newer than ruby 1.8.6p111, you either found an
old version or installed it a long time ago.
 

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

Similar Threads


Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top