Puma安装错误在Windows上

  发布于 2023-01-09 16:01

我想在Windows机器上安装puma gem.我收到以下错误.经过几个论坛却徒劳无功.

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 Headers包和库,如https://github.com/puma/puma/issues/202所述,链接不起作用.

1 个回答
  • bundle update之前跑了bundle install,这解决了我的问题.

    我不确定这是否是唯一有帮助的东西,因为我在此之前手动更新了puma,使用以下步骤:

      通过运行检查openssl Ruby正在使用的版本 ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"

      从http://packages.openknapsack.org/openssl/openssl-1.0.0o-x86-windows.tar.lzma下载了正确的openssl版本 (从https://github.com/hicknhack-software/rails-获取链接disco/wiki /安装-puma-on-windows并根据#1的输出进行编辑.

      使用http://www.7-zip.org将C语言提取到C:\ RailsInstaller\openssl

      gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl

    2023-01-09 16:02 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有