开发者

Bundler error when pushing to Heroku

I get this error when I'm pushing my app to Heroku and it tries to install the SystemTimer gem:

   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_sigalr开发者_如何学Gom_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

Any idea on how to resolve this?


You are deploying on a Ruby 1.9 stack. SystemTimer is only relevant if you are using Ruby 1.8. You should either switch the default heroku stack or use the timeout.rb library from Ruby 1.9 instead of SystemTimer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜