2017-05-01 17 views
1

私の主な目的は、ウィンドウ内でthis ruby​​ codeを実行することです。この目的のために、thisメソッドを使用してWindows 10にcurb gemをインストールしました。インストールはエラーなく実行されますが、私はこれらのメッセージを受け取ります:Ruby curb gem proplem in Windows 10 x64

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

どうしたらよいですか?

+0

を、私は同じ問題を見ています。私はmingw64を使い、[Win64 - Generic](https://curl.haxx.se/download.html#Win64)ビルドをC:\ RubyDevKit \ mingw64 \に展開しました。 'gem install curb --platform = ruby​​ - - --with-curl-lib ="/mingw64/bin "--with-curl-include ="/mingw64/include/"'はうまく動作しますが、 'ruby -e "curbを必要とする; c = Curl :: Easy.new;" 'はあなたが見るのと同じエラーを投げます。 C:\ Ruby22 \ lib \ ruby​​ \ gems \ 2.2.0 \ extensions \ x64-mingw32 \ 2.2.0 \ curb-0.9.3 \ curb_core.soは確かに存在します。 – ryanttb

答えて

0

64bitにはいくつかの宝石に問題があるため、Windows 10では32bit版のrubyを使用することをお勧めします。

まず、32ビットルビーインストーラをhttp://rubyinstaller.orgからダウンロードしてインストールします。

その後 ダウンロードcurl-7.27.0-devel-mingw32、RubyのbinディレクトリにC:/curl-7.27.0-devel-mingw32 コピーであるlibcurl.dllとlibidn-11.dllの両方を展開します。

とインストール:

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" 
関連する問題