Ошибка Bundler при нажатии на Heroku - PullRequest
1 голос
/ 15 августа 2011

Я получаю эту ошибку, когда отправляю свое приложение в Heroku, и оно пытается установить гем SystemTimer:

   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

Есть идеи, как решить эту проблему?

1 Ответ

3 голосов
/ 16 августа 2011

Вы развертываете на стеке Ruby 1.9. SystemTimer имеет значение только в том случае, если вы используете Ruby 1.8. Вы должны либо переключить стек Heroku по умолчанию, либо использовать библиотеку timeout.rb из Ruby 1.9 вместо SystemTimer.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...