[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Error While Install Gem

Nabusman

6/2/2009 7:21:00 PM

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?
--
Posted via http://www.ruby-....

7 Answers

Eric Hodel

6/2/2009 10:03:00 PM

0

On Jun 2, 2009, at 12:21, Nabs Kahn wrote:

> 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?

Nabusman

6/2/2009 10:52:00 PM

0

Eric Hodel wrote:
> On Jun 2, 2009, at 12:21, Nabs Kahn wrote:
>
>> 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?

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
> 2
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
--
Posted via http://www.ruby-....

Eric Hodel

6/2/2009 11:03:00 PM

0

On Jun 2, 2009, at 15:52, Nabs Kahn wrote:
> Eric Hodel wrote:
>> On Jun 2, 2009, at 12:21, Nabs Kahn wrote:
>>
>>> 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?
>
> 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
>> 2

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?

Nabusman

6/2/2009 11:39:00 PM

0

Eric Hodel wrote:
> On Jun 2, 2009, at 15:52, Nabs Kahn wrote:
>>>> extconf.rb:3:in ``': No such file or directory - uname -p
>> 4. nokogiri 1.3.0 (ruby)
>> 5. Skip this gem
>> 6. Cancel installation
>>> 2
>
> 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.rub...

C:\Documents and Settings\Nabs>
--
Posted via http://www.ruby-....

Nabusman

6/2/2009 11:42:00 PM

0

Thanks. Updating Gems...

Will post result.

Nabs
--
Posted via http://www.ruby-....

Nabusman

6/2/2009 11:51:00 PM

0

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

Thanks,

Nabs
--
Posted via http://www.ruby-....

Eric Hodel

6/3/2009 12:25:00 AM

0

On Jun 2, 2009, at 16:51, Nabs Kahn wrote:
> On June 2, 2009 16:39, Nabs Kahn wrote:
>> 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.