0
我試圖在Windows 7上安裝使用Ruby 2.3的機械化。但是我得到了以下錯誤。任何人都可以指出我正確的方向嗎?在Windows 7上使用Ruby 2.3安裝機械化有錯誤
PS C:\DevKit> ruby --version
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
PS C:\DevKit> gem install mechanize
Fetching: net-http-digest_auth-1.4.gem (100%)
Successfully installed net-http-digest_auth-1.4
Fetching: net-http-persistent-2.9.4.gem (100%)
Successfully installed net-http-persistent-2.9.4
Fetching: mime-types-2.99.1.gem (100%)
Successfully installed mime-types-2.99.1
Fetching: unf_ext-0.0.7.2-x64-mingw32.gem (100%)
Successfully installed unf_ext-0.0.7.2-x64-mingw32
Fetching: unf-0.1.4.gem (100%)
Successfully installed unf-0.1.4
Fetching: domain_name-0.5.20160310.gem (100%)
Successfully installed domain_name-0.5.20160310
Fetching: http-cookie-1.0.2.gem (100%)
Successfully installed http-cookie-1.0.2
Fetching: mini_portile2-2.0.0.gem (100%)
Successfully installed mini_portile2-2.0.0
Fetching: nokogiri-1.6.7.2-x64-mingw32.gem (100%)
ERROR: Error installing mechanize:
nokogiri requires Ruby version < 2.3, >= 1.9.2.
PS C:\DevKit> gem install nokogiri --pre
Fetching: mini_portile2-2.1.0.gem (100%)
Successfully installed mini_portile2-2.1.0
Fetching: pkg-config-1.1.7.gem (100%)
Successfully installed pkg-config-1.1.7
Fetching: nokogiri-1.6.8.rc3-x64-mingw32.gem (100%)
Nokogiri is built with the packaged libraries: libxml2-2.9.3, libxslt-1.1.28, zlib-1.2.8, libiconv-1.14.
Successfully installed nokogiri-1.6.8.rc3-x64-mingw32
Parsing documentation for mini_portile2-2.1.0
Installing ri documentation for mini_portile2-2.1.0
Parsing documentation for pkg-config-1.1.7
Installing ri documentation for pkg-config-1.1.7
Parsing documentation for nokogiri-1.6.8.rc3-x64-mingw32
Installing ri documentation for nokogiri-1.6.8.rc3-x64-mingw32
Done installing documentation for mini_portile2, pkg-config, nokogiri after 3 seconds
3 gems installed
PS C:\DevKit> gem install mechanize
ERROR: Error installing mechanize:
nokogiri requires Ruby version < 2.3, >= 1.9.2.
PS C:\DevKit>
是的,這似乎是真的。我想知道是否有任何解決方法來使用Ruby 2.3? –
檢查我編輯的答案!讓我知道這個是否奏效!! –
這隻發生在Windows上!你也可以試試'gem install nokogiri --pre' –