gpt4 book ai didi

ruby-on-rails - Windows 上的 Puma 安装错误

转载 作者:行者123 更新时间:2023-12-04 07:30:28 25 4
gpt4 key购买 nike

我正在尝试在 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 所述。 ,链接失效。

最佳答案

我跑了bundle update之前 bundle install这为我解决了这个问题。

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

  • 通过运行 ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION" 检查正在使用的 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 的输出对其进行编辑)。
  • 使用 http://www.7-zip.org 提取 openssl到 C:\RailsInstaller\openssl
  • gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl
  • 关于ruby-on-rails - Windows 上的 Puma 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24183377/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com