2014-06-12 24 views
5

Tôi đang cố gắng cài đặt đá quý puma trên máy Windows. Tôi nhận được lỗi sau. Đã đi qua một vài diễn đàn nhưng vô ích.Lỗi cài đặt Puma trên 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 

Tôi đã cố gắng cài đặt các gói và thư viện tiêu đề openSSL như được đề cập trên https://github.com/puma/puma/issues/202, các liên kết không hoạt động.

+1

Đây là một vấn đề lớn cho người dùng Window. Hãy xem [this] (https://github.com/puma/puma/issues/202) và [this] (https://github.com/puma/puma/issues/424). –

+0

có thể trùng lặp của [Không thể cài đặt đá quý Puma trên Ruby on Rails.] (Http://stackoverflow.com/questions/20294199/cannot-install-puma-gem-on-ruby-on-rails) –

Trả lời

7

Tôi đã chạy bundle update trước bundle install và điều đó giải quyết được vấn đề cho tôi.

Tôi không chắc chắn nếu đó là điều duy nhất đã giúp, như tôi đã tự cập nhật puma trước đó, sử dụng các bước sau:

  1. Kiểm tra phiên bản của openssl Ruby sử dụng bằng cách chạy ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"
  2. Đã tải xuống phiên bản openssl phù hợp từ http://packages.openknapsack.org/openssl/openssl-1.0.0o-x86-windows.tar.lzma (có liên kết từ https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows và chỉnh sửa nó dựa trên đầu ra của # 1).
  3. openssl Trích sử dụng http://www.7-zip.org để C: \ RailsInstaller \ openssl
  4. gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl
+1

Bạn đã lưu ngày của tôi. Thanh danh!!! :) –

+0

Rất vui khi bạn thấy điều này hữu ích! –

+0

Bạn cũng đã lưu ngày của tôi. Cảm ơn!! – purplerice