加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 当我进行捆绑安装时,我收到了kgio gem的gem安

发布时间:2020-12-17 03:14:49 所属栏目:百科 来源:网络整理
导读:我在我的Gemfile中添加了独角兽,之后当我进行捆绑安装时,我收到了这个错误 em::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb checking for CLOCK_MONOTONIC
我在我的Gemfile中添加了独角兽,之后当我进行捆绑安装时,我收到了这个错误

em::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/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
    --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=/Users/adim86/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
/Users/adim86/.rvm/rubies/ruby-1.9.3-p0/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 /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:686:in `macro_defined?'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:822:in `block in have_macro'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
    from /Users/adim86/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:821:in `have_macro'
    from extconf.rb:5:in `<main>'


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

我的gem文件看起来像这样.我已经尝试将unicorn添加到生产块中,但我仍然得到相同的错误.我也删除了独角兽,我仍然得到相同的错误也尝试了捆绑更新无济于事:

source 'https://rubygems.org'

gem 'rails','3.2.3'

gem 'devise'
gem 'haml-rails'

gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'twitter'
gem 'fb_graph'

gem 'json'
gem 'json_pure'

gem 'simple_form'
gem 'postmark'
gem 'postmark-rails'

gem 'bootstrap-datepicker-rails'
gem 'watu_table_builder',:require => 'table_builder'

gem 'sqlite3'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'uglifier','>= 1.0.3'
end

gem "therubyracer",:require => 'v8'

gem 'jquery-rails'

gem 'differ'


gem 'whenever'
gem 'unicorn'

有人可以帮忙吗?

解决方法

问题是Xcode.转到Xcode设置 – >下载并确保安装了“命令行工具”.一旦我安装它们,捆绑安装运行就好了.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读