2014-06-12 58 views
5

我想在Windows機器上安裝美洲獅寶石。我收到以下錯誤。通過幾個論壇,但徒勞無功。窗口上的美洲獅安裝錯誤

C:/railsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb 
creating Makefile 

make 
generating puma_http11-i386-mingw32.def 
compiling http11_parser.c 
ext/http11/http11_parser.rl: In function 'puma_parser_execute': 
ext/http11/http11_parser.rl:111:3: warning: comparison between signed and unsigned integer expressions 
compiling io_buffer.c 
io_buffer.c: In function 'buf_to_str': 
io_buffer.c:119:3: warning: pointer targets in passing argument 1 of 'rb_str_new' differ in signedness 
c:/RailsInstaller/Ruby2.0.0/include/ruby-2.0.0/ruby/intern.h:668:7: note: expected 'const char *' but argument is of type 'uint8_t *' 
compiling mini_ssl.c 
In file included from mini_ssl.c:3:0: 
c:/RailsInstaller/Ruby2.0.0/include/ruby-2.0.0/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" 
mini_ssl.c:4:25: fatal error: openssl/bio.h: No such file or directory 
compilation terminated. 
make: *** [mini_ssl.o] Error 1 

我試圖將OpenSSL安裝頭包和庫上https://github.com/puma/puma/issues/202如前所述,鏈接不工作。

+1

這一直是窗口用戶的一個大問題。查看[this](https://github.com/puma/puma/issues/202)和[this](https://github.com/puma/puma/issues/424)。 –

+0

[無法在Ruby on Rails上安裝Puma gem。](http://stackoverflow.com/questions/20294199/cannot-install-puma-gem-on-ruby-on-rails) –

回答

7

我跑bundle update之前bundle install,這解決了我的問題。

我不知道這是幫助的唯一的事情,因爲我手動更新之前,彪馬,使用以下步驟:通過運行ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"

    1. 經過其中的OpenSSL版本的Ruby是使用從 下載正確的openssl版本http://packages.openknapsack.org/openssl/openssl-1.0.0o-x86-windows.tar.lzma (從https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows獲得鏈接並根據#1的輸出進行編輯)。
    2. 使用http://www.7-zip.org到C提取的OpenSSL:\ RailsInstaller \ OpenSSL的
    3. gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl
  • +1

    您節省了我的一天。榮譽! :) –

    +0

    很高興你覺得這有幫助! –

    +0

    你也拯救了我的一天。謝謝!! – purplerice