gemが上手く使用できない
初心者なので質問におかしな点があるかもしれませんが御容赦ください。
以下のgemを使用としたのですが上手くいきません。
https://github.com/craysiii/binance
cloud9では以下のやり方で上手くいったのですが、PCにrubyをインストールし、実行したら上手くいきません。
require 'binance'
require 'eventmachine'
puts client.ping
PCはwindowsでruby2.4.4です。gem listの中に使用したいgemは入っているのは確認できるのですが、以下のエラーが出てしまいます。
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- 2.4/rubyeventmachine (LoadError)
・
・
・
一応以下のサイトを参考にeventmachineをアンインストールし、--platform rubyをつけてインストールし直したのですが、やはりうまくいきません。
https://github.com/eventmachine/eventmachine/issues/806
私の知識不足・検索不足は重々承知ですが、教えて頂けると幸いです。
追記
以下が--platform rubyをつけてインストールした際のエラーコードです。
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/ext
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20180929-2192-1nwhkk4.rb extconf.rb
checking for -lcrypto... no
checking for -lssleay32... no
checking for -lcrypto... no
checking for -lssleay32... no
checking for -lcrypto... no
checking for -lssleay32... no
checking for -lcrypto... no
checking for -lssleay32... no
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... no
checking for rb_thread_fd_select()... no
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... no
checking for rb_enable_interrupt()... no
checking for rb_time_new()... no
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for windows.h... yes
checking for winsock.h... yes
checking for -lkernel32... no
could not find library: kernel32
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby24-x64/bin/$(RUBY_BASE_NAME)
--with-ssl-dir
--without-ssl-dir
--with-ssl-include
--without-ssl-include=${ssl-dir}/include
--with-ssl-lib
--without-ssl-lib=${ssl-dir}/lib
--with-openssl-config
--without-openssl-config
--with-pkg-config
--without-pkg-config
--with-cryptolib
--without-cryptolib
--with-ssleay32lib
--without-ssleay32lib
--with-ssl-dir
--without-ssl-dir
--with-ssl-include
--without-ssl-include=${ssl-dir}/include
--with-ssl-lib
--without-ssl-lib=${ssl-dir}/lib
--with-cryptolib
--without-cryptolib
--with-ssleay32lib
--without-ssleay32lib
--with-ssl-dir
--without-ssl-dir
--with-ssl-include
--without-ssl-include=${ssl-dir}/include
--with-ssl-lib
--without-ssl-lib=${ssl-dir}/lib
--with-cryptolib
--without-cryptolib
--with-ssleay32lib
--without-ssleay32lib
--with-ssl-dir
--without-ssl-dir
--with-ssl-include
--without-ssl-include=${ssl-dir}/include
--with-ssl-lib
--without-ssl-lib=${ssl-dir}/lib
--with-cryptolib
--without-cryptolib
--with-ssleay32lib
--without-ssleay32lib
--with-kernel32lib
--without-kernel32lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/eventmachine-1.2.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/eventmachine-1.2.7/gem_make.out
追記2
返信遅れて申し訳わりません。
ridk versionの結果は以下です。
---
ruby:
path: C:/Ruby24-x64
version: 2.4.4
platform: x64-mingw32
ruby_installer:
package_version: 2.4.4-2
git_commit: 513abb8
msys2:
path: C:\Ruby24-x64\msys64
cc: x86_64-w64-mingw32-gcc (Rev1, Built by MSYS2 project) 8.2.0
sh: GNU bash, バージョン 4.4.19(3)-release (x86_64-pc-msys)
os: Microsoft Windows [Version 6.1.7601]
windowsは7です。