2011-08-04 17 views
11

मैंने अभी ओएस एक्स शेर को अपडेट किया है, और अब जब मैं bundle update और bundle install चलाता हूं, तो वे दोनों अलग-अलग कारणों से विफल हो जाते हैं।ओएस एक्स शेर अपग्रेड के बाद बंडल अपडेट और इंस्टॉल विफल - रेल 3

source 'http://rubygems.org' 

gem 'rails' 
gem 'rake', '~> 0.8.7' 

gem 'sqlite3-ruby', :require => 'sqlite3' 
gem 'will_paginate', '3.0.pre2' 

gem 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git' 
gem 'mime-types', :require => 'mime/types' 

gem 'rails3-generators' 

gem 'devise', '~> 1.1.3' 
gem 'devise_invitable', '~> 0.3.4' 

gem 'declarative_authorization', :git => 'git://github.com/stffn/declarative_authorization.git' 

gem 'aasm' 
gem 'braintree' 
gem 'stripe' 

#For voting 
gem 'thumbs_up' 

# For In-Place-Editing 
gem 'best_in_place' 

#For slugs for the plans 
gem "friendly_id", "~> 3.2" 

gem 'aws-s3' 

group :development do 
    # Server 
    gem 'thin' 
    #gem 'rspec-rails', '2.0.1' 
    gem 'annotate-models', '1.0.4' 
    #gem 'rails-erd' 
    gem 'annotate' 
    gem 'faker', '0.3.1' 
    gem 'ruby_parser' 
end 

यह मेरा Gemfile.lock है:

Installing sqlite3 (1.3.4) with native extensions /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb 
checking for sqlite3.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. 

यह मेरा Gemfile है:

Using friendly_id (3.2.1.1) 
Installing json (1.5.3) with native extensions /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb 
checking for re.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=/.rvm/rubies/ruby-1.9.2-p0/bin/ruby 
/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:276:in `postpone' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/mkmf.rb:833:in `have_header' 
    from extconf.rb:14:in `<main>' 


Gem files will remain installed in /.rvm/gems/ruby-1.9.2-p0/gems/json-1.5.3 for inspection. 
Results logged to /.rvm/gems/ruby-1.9.2-p0/gems/json-1.5.3/ext/json/ext/parser/gem_make.out 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions' 
    from /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `block in run' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start' 
    from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>' 
    from /.rvm/gems/ruby-1.9.2-p0/bin/bundle:19:in `load' 
    from /.rvm/gems/ruby-1.9.2-p0/bin/bundle:19:in `<main>' 

बंडल अद्यतन मुझे इस त्रुटि देता है:

बंडल स्थापित मुझे इस त्रुटि देता है

GIT 
    remote: git://github.com/stffn/declarative_authorization.git 
    revision: 792b1558dd79c5305dadade72e9eb458073de190 
    specs: 
    declarative_authorization (0.5.3) 

GIT 
    remote: git://github.com/thoughtbot/paperclip.git 
    revision: cbba34c2b9abb112bb9bae269edb2c8ab01adf51 
    specs: 
    paperclip (2.3.10) 
     activerecord (>= 2.3.0) 
     activesupport (>= 2.3.2) 
     cocaine (>= 0.0.2) 

GEM 
    remote: http://rubygems.org/ 
    specs: 
    aasm (2.2.0) 
    abstract (1.0.0) 
    actionmailer (3.0.8) 
     actionpack (= 3.0.8) 
     mail (~> 2.2.19) 
    actionpack (3.0.8) 
     activemodel (= 3.0.8) 
     activesupport (= 3.0.8) 
     builder (~> 2.1.2) 
     erubis (~> 2.6.6) 
     i18n (~> 0.5.0) 
     rack (~> 1.2.1) 
     rack-mount (~> 0.6.14) 
     rack-test (~> 0.5.7) 
     tzinfo (~> 0.3.23) 
    activemodel (3.0.8) 
     activesupport (= 3.0.8) 
     builder (~> 2.1.2) 
     i18n (~> 0.5.0) 
    activerecord (3.0.8) 
     activemodel (= 3.0.8) 
     activesupport (= 3.0.8) 
     arel (~> 2.0.10) 
     tzinfo (~> 0.3.23) 
    activeresource (3.0.8) 
     activemodel (= 3.0.8) 
     activesupport (= 3.0.8) 
    activesupport (3.0.8) 
    annotate (2.4.0) 
    annotate-models (1.0.4) 
    arel (2.0.10) 
    aws-s3 (0.6.2) 
     builder 
     mime-types 
     xml-simple 
    babosa (0.3.5) 
    bcrypt-ruby (2.1.4) 
    bcrypt-ruby (2.1.4-x86-mingw32) 
    best_in_place (0.1.9) 
     rails (~> 3.0.0) 
    braintree (2.10.1) 
     builder (>= 2.0.0) 
    builder (2.1.2) 
    cocaine (0.1.0) 
    daemons (1.1.3) 
    devise (1.1.9) 
     bcrypt-ruby (~> 2.1.2) 
     warden (~> 1.0.2) 
    devise_invitable (0.3.7) 
     devise (~> 1.1.0) 
    erubis (2.6.6) 
     abstract (>= 1.0.0) 
    eventmachine (0.12.10) 
    faker (0.3.1) 
    friendly_id (3.2.1.1) 
     babosa (~> 0.3.0) 
    i18n (0.5.0) 
    json (1.5.3) 
    mail (2.2.19) 
     activesupport (>= 2.3.6) 
     i18n (>= 0.4.0) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    mime-types (1.16) 
    polyglot (0.3.1) 
    rack (1.2.3) 
    rack-mount (0.6.14) 
     rack (>= 1.0.0) 
    rack-test (0.5.7) 
     rack (>= 1.0) 
    rails (3.0.8) 
     actionmailer (= 3.0.8) 
     actionpack (= 3.0.8) 
     activerecord (= 3.0.8) 
     activeresource (= 3.0.8) 
     activesupport (= 3.0.8) 
     bundler (~> 1.0) 
     railties (= 3.0.8) 
    rails3-generators (0.17.4) 
     railties (>= 3.0.0) 
    railties (3.0.8) 
     actionpack (= 3.0.8) 
     activesupport (= 3.0.8) 
     rake (>= 0.8.7) 
     thor (~> 0.14.4) 
    rake (0.8.7) 
    rest-client (1.6.1) 
     mime-types (>= 1.16) 
    ruby_parser (2.0.6) 
     sexp_processor (~> 3.0) 
    sexp_processor (3.0.5) 
    sqlite3 (1.3.3) 
    sqlite3 (1.3.3-x86-mingw32) 
    sqlite3-ruby (1.3.3) 
     sqlite3 (>= 1.3.3) 
    stripe (1.5.3) 
     json 
     rest-client 
    thin (1.2.11) 
     daemons (>= 1.0.9) 
     eventmachine (>= 0.12.6) 
     rack (>= 1.0.0) 
    thin (1.2.11-x86-mingw32) 
     daemons (>= 1.0.9) 
     eventmachine (>= 0.12.6) 
     rack (>= 1.0.0) 
    thor (0.14.6) 
    thumbs_up (0.4.1) 
    treetop (1.4.9) 
     polyglot (>= 0.3.1) 
    tzinfo (0.3.27) 
    warden (1.0.4) 
     rack (>= 1.0) 
    will_paginate (3.0.pre2) 
    xml-simple (1.0.16) 

PLATFORMS 
    ruby 
    x86-mingw32 

DEPENDENCIES 
    aasm 
    annotate 
    annotate-models (= 1.0.4) 
    aws-s3 
    best_in_place 
    braintree 
    declarative_authorization! 
    devise (~> 1.1.3) 
    devise_invitable (~> 0.3.4) 
    faker (= 0.3.1) 
    friendly_id (~> 3.2) 
    mime-types 
    paperclip! 
    rails 
    rails3-generators 
    rake (~> 0.8.7) 
    ruby_parser 
    sqlite3-ruby 
    stripe 
    thin 
    thumbs_up 
    will_paginate (= 3.0.pre2) 

रनिंग ruby 1.9.2p0

Lemme पता है आप कुछ और की जरूरत है।

उत्तर

23

XCode स्थापित करने के लिए सुनिश्चित करें। इसे ऐप स्टोर से इंस्टॉल करें, लेकिन एप्लिकेशन फ़ोल्डर से "एक्सकोड इंस्टॉल करें" चलाएं।

+1

यह लगता है कि यह विजेता, विजेता चिकन रात का खाना हो सकता है। मैंने इसे ऐप स्टोर से डील किया, लेकिन 'एक्सकोड इंस्टॉल करें' नहीं चलाया। अभी कर रहा हूँ। यदि यह काम करता है, तो आप सर ... को पुरस्कृत किया जाएगा :) – marcamillion

+1

मीठा। यह काम किया! बहुत ज्यादा धन्यवाद। – marcamillion

+4

शेर को अपग्रेड करने के बाद, एक्सकोड को पुनः स्थापित करने के अलावा, मुझे इसे खोलना था, वरीयताओं> डाउनलोड में जाना था और "कमांड लाइन टूल्स" के बगल में "इंस्टॉल करें" पर क्लिक करना था। फिर भी, जब मैं 'bcrypt' स्थापित करने का प्रयास करता हूं, तो 'मेक' विफल रहा, मुझे 'make: /usr/bin/gcc-4.2: ऐसी कोई फ़ाइल या निर्देशिका नहीं'। मैं एक लिनक्स बॉक्स की इच्छा करना शुरू कर रहा था। आखिरकार, मैंने इसे इसके साथ काम किया: https://github.com/kennethreitz/osx-gcc-installer –

0

आप homebrew स्थापित किया है, तो आप भी सिर्फ 'काढ़ा mysql स्थापित' चला सकते हैं और इस mysql और निर्भरता देशी मणि को संकलित करने के लिए आवश्यक स्थापित हो जाएगा।

7

मैं इस समस्या थी, लेकिन XCode स्थापित किया गया था। बाहर निकला कि मैंने XCode से पहले ruby-2.0.0 स्थापित किया था (यह एक नया लैपटॉप था जो मैं गति तक पहुंच रहा था)। एक करना:

rvm reinstall 2.0.0 

मेरे लिए समस्या हल हो गई।

2

मैं क्योंकि मैं नवीनतम डाउनलोड से सेवा की Xcode शर्तों को स्वीकार नहीं किया था एक समान त्रुटि थी।

sudo gcc --version

और फिर समझौते को स्वीकार।

संबंधित मुद्दे