2011-10-24 8 views
2

레일 3.1.1에 내 앱을 업그레이드하려고합니다. railscasts tutorial을 따르고 있으므로 3.0.9로 먼저 업데이트되었습니다. will_paginate에 몇 가지 문제가 있었지만 새로운 버전으로 업데이트 한 후 해결되었습니다. 이제 모든 테스트가 끝나고 3.1.1로 업데이트하려고합니다.레일 3.1.1로 업그레이드 할 때 오류가 발생했습니다.

그래서 Rails 3.1.1을 사용하기 위해 Gemfile을 수정했지만, bundle update을 실행하면 다음과 같은 결과가 나타납니다. 개발 도구 설치에 대한 메시지).

편집 : 이것은 OSX Lion을 설치 한 후 xcode를 업그레이드하지 않은 것과 관련이 있다고 생각하기 시작했습니다. 그럴 수 있니?

rvm get latest 
rvm reload 
rvm --force install 1.9.2 

당신이 무엇을해야합니까 :

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

'/ 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 –

답변

3

일반적으로 업데이트 RVM은 '먼저 개발 도구를 설치해야합니다'오류를 해결 ... 나는 지금 그것을 다운로드하고 있지만 시간이 걸릴 것 mkmf.log?

+0

첫 번째 명령을 사용하려고 할 때 'ERROR : rvm update has been removed. 대신 'rvm get'및 rvm 'rubygems'CLI API를 참조하십시오. 또한 어디서나 mkmf.log를 찾을 수 없습니다. 어디를 봐야합니까? –

+0

안녕하세요, 당신 말이 맞습니다. rvm udpate는 더 이상 사용되지 않습니다. 내 답장을 업데이트했습니다. 지금 mkmf.log의 정확한 경로는 아닙니다. * nix에 있다고 가정하면 다음 명령을 사용하여 파일 시스템에서 파일을 검색 할 수 있습니다 : find/-name mkmf.log –

+0

Paulo에게 감사드립니다. 나는 이미 그 명령으로 검색을 시도했지만 아무런 결과도 얻지 못했습니다 ... 나는 시도 할 것입니다. 새로운 rvm 명령 –

관련 문제