我正在尝试安装 eventmachine,以便可以运行此程序https://github.com/alexagranov/earnings_date_finder 以查看它的作用。
我收到此错误:
C:\Users\Dakota\Downloads\rails\rails_apps\earnings>ruby script/rails
Could not find eventmachine-0.12.10 in any of the sources
Run `bundle install` to install missing gems.
当我运行“捆绑安装”时,我得到了这个:
C:\Users\Dakota\Downloads\rails\rails_apps\earnings>bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Using rake (0.9.2.2)
Using abstract (1.0.0)
Using activesupport (3.0.11)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.11)
Using erubis (2.6.6)
Using rack (1.2.4)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.31)
Using actionpack (3.0.11)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.11)
Using arel (2.0.10)
Using activerecord (3.0.11)
Using activeresource (3.0.11)
Using archive-tar-minitar (0.5.2)
Using bundler (1.3.5)
Using columnize (0.3.4)
Using daemons (1.1.4)
Installing eventmachine (0.12.10)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
C:/Users/Dakota/Downloads/rails/ruby/bin/ruby.exe extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... *** 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:/Users/Dakota/Downloads/rails/ruby/bin/ruby
C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:431:in `try_do':
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:546:
in `block in try_compile'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:499:
in `with_werror'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:546:
in `try_compile'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:736:
in `try_var'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:1023
:in `block in have_var'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:892:
in `block in checking_for'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:337:
in `block (2 levels) in postpone'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:307:
in `open'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:337:
in `block in postpone'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:307:
in `open'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:333:
in `postpone'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:891:
in `checking_for'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:1022
:in `have_var'
from extconf.rb:16:in `<main>'
Gem files will remain installed in C:/Users/hgc33_000/Downloads/rails/ruby/lib/r
uby/gems/2.0.0/gems/eventmachine-0.12.10 for inspection.
Results logged to C:/Users/hgc33_000/Downloads/rails/ruby/lib/ruby/gems/2.0.0/ge
ms/eventmachine-0.12.10/ext/gem_make.out
An error occurred while installing eventmachine (0.12.10), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling.
我尝试了许多不同的方法来安装 eventmachine,但每种方法都会给我同样的错误。
对于记录'gem install eventmachine --pre'给了我这个错误:
C:\Users\Dakota\Downloads\rails\rails_apps\earnings>gem install eventmachine --pre
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
C:/Users/Dakota/Downloads/rails/ruby/bin/ruby.exe extconf.rb
checking for main() in -lssl... *** 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:/Users/Dakota/Downloads/rails/ruby/bin/ruby
--with-openssl-config
--without-openssl-config
--with-pkg-config
--without-pkg-config
--with-ssl-dir
--without-ssl-dir
--with-ssl-include
--without-ssl-include=${ssl-dir}/include
--with-ssl-lib
--without-ssl-lib=${ssl-dir}/
--with-ssllib
--without-ssllib
C:/Users/hgc33_000/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:431:in `try_do':
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:516:
in `try_link0'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:531:
in `try_link'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:717:
in `try_func'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:947:
in `block in have_library'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:892:
in `block in checking_for'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:337:
in `block (2 levels) in postpone'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:307:
in `open'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:337:
in `block in postpone'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:307:
in `open'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:333:
in `postpone'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:891:
in `checking_for'
from C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/2.0.0/mkmf.rb:942:
in `have_library'
from extconf.rb:5:in `block in check_libs'
from extconf.rb:5:in `each'
from extconf.rb:5:in `all?'
from extconf.rb:5:in `check_libs'
from extconf.rb:39:in `manual_ssl_config'
from extconf.rb:61:in `<main>'
Gem files will remain installed in C:/Users/Dakota/Downloads/rails/ruby/lib/r
uby/gems/2.0.0/gems/eventmachine-1.0.3 for inspection.
Results logged to C:/Users/Dakota/Downloads/rails/ruby/lib/ruby/gems/2.0.0/ge
ms/eventmachine-1.0.3/ext/gem_make.out