簡體   English   中英

捆綁更新獨角獸錯誤

[英]Bundle Update Unicorn Error

Rails 4.0.1可用,並嘗試更新到該版本(當前為4.0版)

我正在運行bundle update ,它開始正常運行,但是隨后出現似乎與Unicorn有關的錯誤,因此整個操作都異常中止。 錯誤如下:

Installing unicorn (4.7.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/myname/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
checking for SIZEOF_OFF_T in ruby.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=/Users/myname/.rbenv/versions/2.0.0-p247/bin/ruby
/Users/myname/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.

知道如何解決這個問題嗎?

寶石文件

source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
gem 'pg'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'jquery-ui-rails'
gem 'jbuilder', '~> 1.2'
group :doc do
  gem 'sdoc', require: false
end
gem 'bcrypt-ruby', '~> 3.0.1'
gem "figaro"
gem 'unicorn'
group :production do
  gem 'rails_12factor'
end
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
gem 'memcachier'
gem 'dalli'
gem 'devise'

嘗試跑步

brew update  

我對獨角獸不是很熟悉,但是當您升級到新的操作系統時,有時可能需要使用gem和插件才能正常工作。

我有一些想法。

  1. 將您的gem文件更改為以下內容:

     gem "unicorn", "~> 4.7.0" 
  2. 我不經常使用紅寶石寶石網站。 我通常只看github,但是根據該網站,您沒有某些依賴關系。

RubyGems屏幕截圖

最近升級到Mavericks操作系統(和新版本的XCode)后,我需要先同意Xcode條款和條件,然后軟件包更新才能生效。

無論如何-現在一切正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM