2011-10-24 3 views
2

J'essaie de mettre à jour mon application sur les rails 3.1.1. Je suis le railscasts tutorial, donc j'ai d'abord mis à jour à 3.0.9. J'ai eu quelques problèmes avec will_paginate mais ils ont été résolus après la mise à jour vers une version plus récente. Maintenant, tous mes tests passent et j'essaie de mettre à jour 3.1.1Erreur lors de la mise à niveau vers Rails 3.1.1

J'ai donc modifié mon Gemfile pour utiliser Rails 3.1.1, mais quand je fais bundle update, je reçois la sortie suivante (avec quelques erreurs rubis dans et un message sur l'installation des outils de développement en premier). Éditer: commencer à penser que cela a quelque chose à voir avec le fait de ne pas avoir mis à niveau xcode après l'installation d'OSX Lion. Serait-ce cela? Je suis le téléchargement maintenant, mais ça va prendre un certain temps ...

MacBoo:myapp oalo$ bundle update 
Fetching source index for http://rubygems.org/ 
Using rake (0.9.2.2) 
Using ZenTest (4.6.2) 
Using multi_json (1.0.3) 
Using activesupport (3.1.1) 
Using builder (3.0.0) 
Using i18n (0.6.0) 
Using activemodel (3.1.1) 
Using erubis (2.7.0) 
Using rack (1.3.5) 
Using rack-cache (1.1) 
Using rack-mount (0.8.3) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.0.3) 
Using actionpack (3.1.1) 
Using mime-types (1.17.1) 
Using polyglot (0.3.2) 
Using treetop (1.4.10) 
Using mail (2.3.0) 
Using actionmailer (3.1.1) 
Using arel (2.2.1) 
Using tzinfo (0.3.30) 
Using activerecord (3.1.1) 
Using activeresource (3.1.1) 
Using annotate (2.4.0) 
Using autotest (4.4.6) 
Installing sys-uname (0.8.6) with native extensions /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

     /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb 
checking for sysctl()... *** 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/oalo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby 
/Users/oalo/.rvm/rubies/ruby-1.9.2-p180/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 /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:440:in `try_link' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:552:in `try_func' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_func' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:276:in `postpone' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:796:in `have_func' 
    from extconf.rb:5:in `<main>' 


Gem files will remain installed in /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/sys-uname-0.8.6 for inspection. 
Results logged to /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/sys-uname-0.8.6/ext/gem_make.out 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:530:in `block in build_extensions' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `each' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `build_extensions' 
    from /Users/oalo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in `install' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `block in install' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `block (2 levels) in run' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `block in run' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `block in each' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/cli.rb:270:in `update' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/bin/bundle:13:in `<top (required)>' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/bin/bundle:19:in `load' 
    from /Users/oalo/.rvm/gems/ruby-1.9.2-p180/bin/bundle:19:in `<main>' 
MacBoo:myapp oalo$ 
+0

Que contient '/ Users/oalo/.rvm/gems/ruby-1.9.2-p180/gems/sys-uname-0.8.6/ext/gem_make.out'? –

+0

@DouglasFShearer http://pastebin.com/wRJru6rR –

Répondre

3

mise à jour Habituellement RVM fixe le « Vous devez installer les outils de développement d'abord » erreur:

rvm get latest 
rvm reload 
rvm --force install 1.9.2 

Qu'est-ce que vous avez dans le mkmf.log?

+0

Je reçois une erreur lorsque j'essaie d'utiliser la première commande: 'ERREUR: la mise à jour de rvm a été supprimée. Voir 'rvm get' et rvm 'rubygems' CLI API à la place '. En outre, ne peux pas trouver mkmf.log n'importe où, où devrais-je regarder? –

+0

Bonjour, vous avez raison. rvm udpate est obsolète. J'ai mis à jour ma réponse. Je n'ai pas maintenant le chemin exact vers mkmf.log; en supposant que vous êtes en * nix vous pouvez le rechercher dans votre système de fichiers en utilisant la commande suivante: find/-name mkmf.log –

+0

Merci Paulo, j'avais déjà essayé de chercher avec cette commande, et aucun résultat ... Je vais essayer la nouvelle commande rvm –

Questions connexes