有同学遇到过这种情况吗?windows下安装失败ruby版本是2.1, devkit 也安装成功了
c:\Ruby21>gem install cf-uaac -r --source http://rubygems.org/
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: A connection attempt failed because the connected party d
d not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2) for "api.rubygems.or
" port 80 (http://api.rubygems.org/gems/cf-uaa-lib-3.1.0.gem)c:\Ruby21>gem install cf-uaac -r --source http://rubygems.org/
Fetching: cf-uaa-lib-3.1.0.gem (100%)
Successfully installed cf-uaa-lib-3.1.0
Fetching: highline-1.6.21.gem (100%)
Successfully installed highline-1.6.21
Fetching: eventmachine-1.0.7.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing cf-uaac:
        ERROR: Failed to build gem native extension.    C:/Ruby21/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:/Ruby21/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}/lib
        --with-ssllib
        --without-ssllib
C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generat
e an executable file. (RuntimeError)
You have to install development tools first.
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpo
ne'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
        from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:968: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:64:in `<main>'extconf failed, exit code 1Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/eventmachi
ne-1.0.7 for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/eve
ntmachine-1.0.7/gem_make.out

解决方案 »

  1.   

    c:\Ruby21>gem install cf-uaac -r --source http://rubygems.org/
     Fetching: cf-uaa-lib-3.1.0.gem (100%)
     Successfully installed cf-uaa-lib-3.1.0
     Fetching: highline-1.6.21.gem (100%)
     Successfully installed highline-1.6.21
     Fetching: eventmachine-1.0.7.gem (100%)
     Temporarily enhancing PATH to include DevKit...
     Building native extensions.  This could take a while...
     ERROR:  Error installing cf-uaac:
             ERROR: Failed to build gem native extension.     C:/Ruby21/bin/ruby.exe extconf.rb
     checking for main() in -lssl... *** extconf.rb failed ***
     Could not create Makefile due to 60400.com 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:/Ruby21/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}/lib
             --with-ssllib
             --without-ssllib