简体   繁体   English

安装 puma 后捆绑安装失败

[英]bundle install fails after installing puma

I'm running bundle install and it failed in the middle with the error:我正在运行bundle install ,它在中间失败并出现错误:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/Mahmoud/dev-reps/non-docker/normal/vendor/bundle/ruby/2.5.0/gems/puma-4.3.1/ext/puma_http11
/Users/Mahmoud/.rbenv/versions/2.5.5/bin/ruby -r ./siteconf20220308-96584-8zjcoy.rb extconf.rb --with-cppflags=-I/usr/local/opt/openssl/include
checking for BIO_read() in -lcrypto... yes

...
...
An error occurred while installing puma (4.3.1), and Bundler cannot continue.
Make sure that `gem install puma -v '4.3.1' --source 'http://rubygems.org/'` succeeds before bundling.

After some failures to install puma, and after much searching and many trials, I was able to install it through:在安装 puma 失败后,经过大量搜索和尝试,我能够通过以下方式安装它:

gem install puma:4.3.1 -- --with-cflags="-Wno-error=implicit-function-declaration"

and the gem installed successfully, giving:并且 gem 安装成功,给出:

Building native extensions with: '--with-cflags=-Wno-error=implicit-function-declaration'
This could take a while...
Successfully installed puma-4.3.1
Parsing documentation for puma-4.3.1
Done installing documentation for puma after 0 seconds
1 gem installed

My problem currently is that trying bundle install again still fails with the same error.我目前的问题是再次尝试bundle install仍然失败并出现相同的错误。 Tried restarting terminal, but still same.尝试重新启动终端,但仍然相同。 It's as if puma has not been installed at all.就好像根本没有安装puma一样。 What am I doing wrong?我究竟做错了什么?

Finally got bundle to work using:终于得到了捆绑工作使用:

bundle config build.puma --with-cflags="-Wno-error=implicit-function-declaration"

from this answer here这里的答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM