sparklemotion / mechanize

Mechanize is a ruby library that makes automated web interaction easy.

Home Page:https://www.rubydoc.info/gems/mechanize/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable in gem install mechanize

Ekultek opened this issue · comments

C:\>gem install mechanize
ERROR:  Error installing mechanize:
        nokogiri requires Ruby version < 2.3, >= 1.9.2.

However!!!!!

C:\>nokogiri -v
# Nokogiri (1.6.8.rc3)
    ---
    warnings: []
    nokogiri: 1.6.8.rc3
    ruby:
      version: 2.3.0
      platform: i386-mingw32
      description: ruby 2.3.0p0 (2015-12-25 revision 53290) [i386-mingw32]
      engine: ruby
    libxml:
      binding: extension
      source: packaged
      libxml2_path: "/home/flavorjones/code/oss/nokogiri/ports/i686-w64-mingw32/libxml
2/2.9.3"
      libxslt_path: "/home/flavorjones/code/oss/nokogiri/ports/i686-w64-mingw32/libxsl
t/1.1.28"
      libxml2_patches: []
      libxslt_patches:
      - 0001-Adding-doc-update-related-to-1.1.28.patch
      - 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
      - 0003-Initialize-pseudo-random-number-generator-with-curre.patch
      - 0004-EXSLT-function-str-replace-is-broken-as-is.patch
      - 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
      - 0007-Separate-function-for-predicate-matching-in-patterns.patch
      - 0008-Fix-direct-pattern-matching.patch
      - 0009-Fix-certain-patterns-with-predicates.patch
      - 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
      - 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
      - 0014-Fix-for-bug-436589.patch
      - 0015-Fix-mkdir-for-mingw.patch
      - 0016-Fix-for-type-confusion-in-preprocessing-attributes.patch
      - 0017-Updated-config.guess.patch
      compiled: 2.9.3
      loaded: 2.9.3

So it's bluntly obvious that nokogiri is installed, what do I do?

I figured it out, for everyone having this issue on Windows 7:

First install nokogiri's previous version: gem install nokogiri --pre
Next install nokogiri version 1.6: gem install nokogiri -v 1.6
Finally: gem install mechanize and it will work!