我正在尝试将我的 rails 项目上传到 heroku。我不断收到错误:
An error occurred while installing SystemTimer (1.2.3), and Bundler cannot
continue.
我已经做了一些研究并进行了相应的修改,但它仍然无法正常工作。首先,我尝试在我的 gemfile 中注释掉 SystemTimer,但没有这样做。我的 heroku 系统堆栈显然是 Cedar 1.9.1。我的红宝石版本是 1.8.7。根据网上的一些研究,把:
ruby '1.8.7'
在 gemfile 中将恢复到 Cedar 1.8.7,并相应地编译它,但这也不起作用。知道我能做什么吗?这是我不断收到的全部信息(不知道为什么会出现 1.9.1,即使我在 gemfile 中明确提到了 1.8.7):
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
christophecompaq@ubuntu:~/Populisto-heroku$ git push heroku master
Counting objects: 1347, done.
Compressing objects: 100% (871/871), done.
Writing objects: 100% (1347/1347), 3.09 MiB | 99 KiB/s, done.
Total 1347 (delta 426), reused 1033 (delta 276)
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Installing rake (0.9.5)
Installing SystemTimer (1.2.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
creating Makefile
make
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o system_timer_native.o -c system_timer_native.c
In file included from system_timer_native.c:8:
/usr/local/include/ruby-1.9.1/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete
system_timer_native.c: In function ‘install_first_timer_and_save_original_configuration’:
system_timer_native.c:46: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:53: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:57: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:62: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:65: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:69: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:82: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:89: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:96: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:101: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c: In function ‘install_next_timer’:
system_timer_native.c:112: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:119: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:123: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:130: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:136: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:143: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:146: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c: In function ‘restore_original_configuration’:
system_timer_native.c:157: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:160: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:168: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:170: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:172: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c: In function ‘restore_original_timer_interval’:
system_timer_native.c:190: warning: passing argument 1 of ‘log_error’ discards qualifiers from pointer target type
system_timer_native.c:38: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:192: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c: In function ‘restore_sigalrm_mask’:
system_timer_native.c:199: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:201: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:37: note: expected ‘char *’ but argument is of type ‘const char *’
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)
system_timer_native.c: In function ‘clear_pending_sigalrm_for_ruby_threads’:
system_timer_native.c:266: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:237: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c: In function ‘set_itimerval’:
system_timer_native.c:290: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:237: note: expected ‘char *’ but argument is of type ‘const char *’
system_timer_native.c:299: warning: passing argument 1 of ‘log_debug’ discards qualifiers from pointer target type
system_timer_native.c:237: note: expected ‘char *’ but argument is of type ‘const char *’
make: *** [system_timer_native.o] Error 1
Gem files will remain installed in /tmp/build_nn5uo1y1yyxf/vendor/bundle/ruby/1.9.1/gems/SystemTimer-1.2.3 for inspection.
Results logged to /tmp/build_nn5uo1y1yyxf/vendor/bundle/ruby/1.9.1/gems/SystemTimer-1.2.3/ext/system_timer/gem_make.out
An error occurred while installing SystemTimer (1.2.3), and Bundler cannot
continue.
Make sure that `gem install SystemTimer -v '1.2.3'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app