Error While Install Gem

Discussion in 'Ruby' started by Nabs Kahn, Jun 2, 2009.

  1. Nabs Kahn

    Nabs Kahn Guest

    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-forum.com/.
    Nabs Kahn, Jun 2, 2009
    #1
    1. Advertising

  2. Nabs Kahn

    Eric Hodel Guest

    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?
    Eric Hodel, Jun 2, 2009
    #2
    1. Advertising

  3. Nabs Kahn

    Nabs Kahn Guest

    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-forum.com/.
    Nabs Kahn, Jun 2, 2009
    #3
  4. Nabs Kahn

    Eric Hodel Guest

    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?
    Eric Hodel, Jun 3, 2009
    #4
  5. Nabs Kahn

    Nabs Kahn Guest

    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.rubyforge.org

    C:\Documents and Settings\Nabs>
    --
    Posted via http://www.ruby-forum.com/.
    Nabs Kahn, Jun 3, 2009
    #5
  6. Nabs Kahn

    Nabs Kahn Guest

    Nabs Kahn, Jun 3, 2009
    #6
  7. Nabs Kahn

    Nabs Kahn Guest

    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-forum.com/.
    Nabs Kahn, Jun 3, 2009
    #7
  8. Nabs Kahn

    Eric Hodel Guest

    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.
    Eric Hodel, Jun 3, 2009
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. han
    Replies:
    1
    Views:
    117
    Lyle Johnson
    Oct 24, 2005
  2. Clifford Heath
    Replies:
    7
    Views:
    293
    Shanti Braford
    Jun 9, 2006
  3. Austin 7873
    Replies:
    5
    Views:
    179
    Eric Hodel
    Jan 27, 2007
  4. Lost Warrior
    Replies:
    0
    Views:
    83
    Lost Warrior
    Apr 12, 2008
  5. Markus Fischer
    Replies:
    4
    Views:
    336
    Nick Klauer
    Mar 27, 2011
Loading...

Share This Page