gpt4 book ai didi

ruby-on-rails-3 - 在 kgio 安装上使用 unicorn gem 捆绑安装失败

转载 作者:行者123 更新时间:2023-12-04 07:09:31 24 4
gpt4 key购买 nike

我尝试将 unicorn gem 添加到我的 gem 文件中,当我运行 bundle install 时出现以下错误:

Installing kgio (2.8.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for CLOCK_MONOTONIC in time.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:686:in `macro_defined?'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:822:in `block in have_macro'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:821:in `have_macro'
from extconf.rb:5:in `<main>'


Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/kgio-2.8.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p392/gems/kgio-2.8.1/ext/kgio/gem_make.out
An error occurred while installing kgio (2.8.1), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.8.1'` succeeds before bundling.

在包含 unicorn gem 之前,我在运行 bundle install 时没有问题。尝试安装 kgio 2.8.1 时似乎失败。我在 Stackoverflow 和其他地方搜索过解决方案,最常见的解决方案似乎是安装 Xcode 开发工具。我已经这样做了,但没有解决问题。

我正在使用 Ruby 1.9.3p392 运行 Mac OSX 10.9.1 Mavericks。真的需要解决这个问题,任何帮助将不胜感激。

最佳答案

我更新到 Ruby 2.1,问题解决了。

关于ruby-on-rails-3 - 在 kgio 安装上使用 unicorn gem 捆绑安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21325504/

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