2011-08-15 73 views
1

我得到這個錯誤,當我推着我的應用程序的Heroku,並試圖安裝SystemTimer寶石:捆紮機錯誤時,Heroku的

Installing SystemTimer (1.2.3) with native extensions /usr/ruby1.9.2/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) 

    /usr/ruby1.9.2/bin/ruby extconf.rb 
    creating Makefile 

    make 
    gcc -I. -I/usr/ruby1.9.2/include/ruby-1.9.1/x86_64-linux -I/usr/ruby1.9.2/include/ruby-1.9.1/ruby/backward -I/usr/ruby1.9.2/include/ruby-1.9.1 -I. -fPIC -O2 -fno-strict-aliasing -o system_timer_native.o -c system_timer_native.c 
    In file included from system_timer_native.c:8: 
    /usr/ruby1.9.2/include/ruby-1.9.1/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete 
    system_timer_native.c: In function ‘install_ruby_sigalrm_handler’: 
    system_timer_native.c:211: error: ‘rb_thread_critical’ undeclared (first use in this function) 
    system_timer_native.c:211: error: (Each undeclared identifier is reported only once 
    system_timer_native.c:211: error: for each function it appears in.) 
    system_timer_native.c: In function ‘restore_original_ruby_sigalrm_handler’: 
    system_timer_native.c:217: error: ‘rb_thread_critical’ undeclared (first use in this function) 
    make: *** [system_timer_native.o] Error 1 


    Gem files will remain installed in /disk1/tmp/build_8wstwizmtz3r/.bundle/gems/ruby/1.9.1/gems/SystemTimer-1.2.3 for inspection. 
    Results logged to /disk1/tmp/build_8wstwizmtz3r/.bundle/gems/ruby/1.9.1/gems/SystemTimer-1.2.3/ext/system_timer/gem_make.out 
    from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions' 
    from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each' 
    from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions' 
    from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `block in run' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start' 
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>' 
    from /usr/ruby1.9.2/bin/bundle:19:in `load' 
    from /usr/ruby1.9.2/bin/bundle:19:in `<main>' 
    FAILED: http://devcenter.heroku.com/articles/bundler 
!  Heroku push rejected, failed to install gems via Bundler 

關於如何解決這個任何想法?

回答

3

您正在部署在Ruby 1.9堆棧上。 SystemTimer僅在您使用Ruby 1.8時才相關。您應該切換默認的heroku堆棧或使用Ruby 1.9中的timeout.rb庫而不是SystemTimer。