Windows 10 x64中的Ruby curb gem问题

问题描述 投票:1回答:1

我的主要目的是在Windows中执行this ruby​​代码。为此,我使用this方法将curb gem安装到Windows 10。虽然安装没有任何错误,但我正在接受以下消息:

C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': 126: The specified module could not be found.
C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/curb-0.9.3/curb_core.so (LoadError)
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/curb-0.9.3/lib/curl.rb:1:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/curb-0.9.3/lib/curb.rb:1:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from ted-postrank.rb:7:in `<main>'

这有什么问题?

ruby windows rubygems curb
1个回答
0
投票

我建议在Windows 10上使用32位版本的ruby,因为64位有一些宝石有问题。

首先从http://rubyinstaller.org下载32位ruby安装程序并安装它。

然后下载curl-7.27.0-devel-mingw32,在C:/curl-7.27.0-devel-mingw32中将其解压缩,将libcurl.dll和libidn-11.dll复制到Ruby bin目录中。

并安装:

gem install curb --platform=ruby -- --with-curl-lib="C:/curl-7.27.0-devel-mingw32/bin" --with-curl-include="C:/curl-7.27.0-devel-mingw32/include"
© www.soinside.com 2019 - 2024. All rights reserved.