3
我已經將Linux從Ruby(使用RVM)導入到MacOSX(rbenv)。兩者都使用相同版本的Rails &紅寶石。當我遵循GoRails指南在兩臺機器上安裝RoR時。Gem :: Ext :: BuildError:錯誤:無法爲Puma Gem創建Gem本機擴展
因此,我已經將sample_app從Linux導入到MacOSX,我運行了bundle install。我安裝了近50-100個寶石,但是這個失敗了。我不知道它爲什麼失敗。對我來說,它似乎沒有編譯一些c文件,但我不知道如何解決這些錯誤。謝謝
Installing puma 2.11.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/var/rbenv/versions/2.2.3/bin/ruby -r ./siteconf20160304-50117-b8gsxw.rb extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling http11_parser.c
compiling io_buffer.c
io_buffer.c:119:10: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
return rb_str_new(b->top, b->cur - b->top);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/var/rbenv/versions/2.2.3/include/ruby-2.2.0/ruby/intern.h:796:20: note: expanded from macro 'rb_str_new'
rb_str_new_static((str), (len)) : \
^~~~~
/usr/local/var/rbenv/versions/2.2.3/include/ruby-2.2.0/ruby/intern.h:727:37: note: passing argument to parameter here
VALUE rb_str_new_static(const char *, long);
^
io_buffer.c:119:10: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
return rb_str_new(b->top, b->cur - b->top);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/var/rbenv/versions/2.2.3/include/ruby-2.2.0/ruby/intern.h:797:13: note: expanded from macro 'rb_str_new'
rb_str_new((str), (len)); \
^~~~~
/usr/local/var/rbenv/versions/2.2.3/include/ruby-2.2.0/ruby/intern.h:706:29: note: passing argument to parameter here
VALUE rb_str_new(const char*, long);
^
2 warnings generated.
compiling mini_ssl.c
In file included from mini_ssl.c:3:
/usr/local/var/rbenv/versions/2.2.3/include/ruby-2.2.0/ruby/backward/rubyio.h:2:2: warning: use "ruby/io.h" instead of "rubyio.h" [-W#warnings]
#warning use "ruby/io.h" instead of "rubyio.h"
^
mini_ssl.c:4:10: fatal error: 'openssl/bio.h' file not found
#include <openssl/bio.h>
^
1 warning and 1 error generated.
make: *** [mini_ssl.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/puma-2.11.1 for inspection.
Results logged to /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/puma-2.11.1/gem_make.out
我的OpenSSL已經安裝> BREW將OpenSSL安裝 警告:的OpenSSL 1.0.2g已經安裝 – AbhimanyuAryan
然後運行的其他兩個命令,它應該工作。 –