使用大米宝石(1.4.3)后,我似乎无法推送到heroku。我总是收到以下错误:
Installing rice (1.4.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ruby.h... yes
checking for node.h... no
checking for ruby/node.h... no
checking for version.h... no
checking for env.h... no
checking host system type... (cached) x86_64-unknown-linux-gnu
checking for doxygen... no
configure: WARNING: doxygen not found - will not generate any doxygen documentation
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating rice/Makefile
config.status: creating test/Makefile
config.status: creating sample/Makefile
config.status: creating ruby/Makefile
config.status: creating ruby/lib/Makefile
config.status: creating test/ext/Makefile
config.status: creating ruby/lib/mkmf-rice.rb
config.status: creating rice/detail/ruby_version_code.hpp
config.status: creating rice/config.hpp
config.status: rice/config.hpp is unchanged
config.status: executing depfiles commands
make
Making all in rice
make[1]: Entering directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice'
make all-am
make[2]: Entering directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice'
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Class.o -MD -MP -MF .deps/Class.Tpo -c -o Class.o Class.cpp
mv -f .deps/Class.Tpo .deps/Class.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Data_Type.o -MD -MP -MF .deps/Data_Type.Tpo -c -o Data_Type.o Data_Type.cpp
mv -f .deps/Data_Type.Tpo .deps/Data_Type.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Director.o -MD -MP -MF .deps/Director.Tpo -c -o Director.o Director.cpp
mv -f .deps/Director.Tpo .deps/Director.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Exception.o -MD -MP -MF .deps/Exception.Tpo -c -o Exception.o Exception.cpp
mv -f .deps/Exception.Tpo .deps/Exception.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Identifier.o -MD -MP -MF .deps/Identifier.Tpo -c -o Identifier.o Identifier.cpp
mv -f .deps/Identifier.Tpo .deps/Identifier.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Module.o -MD -MP -MF .deps/Module.Tpo -c -o Module.o Module.cpp
mv -f .deps/Module.Tpo .deps/Module.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Object.o -MD -MP -MF .deps/Object.Tpo -c -o Object.o Object.cpp
mv -f .deps/Object.Tpo .deps/Object.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT String.o -MD -MP -MF .deps/String.Tpo -c -o String.o String.cpp
mv -f .deps/String.Tpo .deps/String.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Struct.o -MD -MP -MF .deps/Struct.Tpo -c -o Struct.o Struct.cpp
mv -f .deps/Struct.Tpo .deps/Struct.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Symbol.o -MD -MP -MF .deps/Symbol.Tpo -c -o Symbol.o Symbol.cpp
mv -f .deps/Symbol.Tpo .deps/Symbol.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT VM.o -MD -MP -MF .deps/VM.Tpo -c -o VM.o VM.cpp
mv -f .deps/VM.Tpo .deps/VM.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Arg_operators.o -MD -MP -MF .deps/Arg_operators.Tpo -c -o Arg_operators.o Arg_operators.cpp
mv -f .deps/Arg_operators.Tpo .deps/Arg_operators.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT Address_Registration_Guard.o -MD -MP -MF .deps/Address_Registration_Guard.Tpo -c -o Address_Registration_Guard.o Address_Registration_Guard.cpp
mv -f .deps/Address_Registration_Guard.Tpo .deps/Address_Registration_Guard.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT check_ruby_type.o -MD -MP -MF .deps/check_ruby_type.Tpo -c -o check_ruby_type.o `test -f 'detail/check_ruby_type.cpp' || echo './'`detail/check_ruby_type.cpp
mv -f .deps/check_ruby_type.Tpo .deps/check_ruby_type.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT demangle.o -MD -MP -MF .deps/demangle.Tpo -c -o demangle.o `test -f 'detail/demangle.cpp' || echo './'`detail/demangle.cpp
mv -f .deps/demangle.Tpo .deps/demangle.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT method_data.o -MD -MP -MF .deps/method_data.Tpo -c -o method_data.o `test -f 'detail/method_data.cpp' || echo './'`detail/method_data.cpp
mv -f .deps/method_data.Tpo .deps/method_data.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I/usr/local/include/ruby-1.9.1 -I/usr/local/include/ruby-1.9.1/x86_64-linux -MT protect.o -MD -MP -MF .deps/protect.Tpo -c -o protect.o `test -f 'detail/protect.cpp' || echo './'`detail/protect.cpp
mv -f .deps/protect.Tpo .deps/protect.Po
rm -f librice.a
ar cru librice.a Class.o Data_Type.o Director.o Exception.o Identifier.o Module.o Object.o String.o Struct.o Symbol.o VM.o Arg_operators.o Address_Registration_Guard.o check_ruby_type.o demangle.o method_data.o protect.o
ranlib librice.a
make[2]: Leaving directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice'
make[1]: Leaving directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice'
Making all in test
make[1]: Entering directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/test'
Making all in ext
make[2]: Entering directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/test/ext'
/usr/local/bin/ruby -I/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/ruby/lib -C t1 extconf.rb --with-cppflags="-I/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3" --with-libpath="/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice"
checking for main() in -lrice... yes
creating Makefile
/usr/local/bin/ruby -I/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/ruby/lib -C t2 extconf.rb --with-cppflags="-I/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3" --with-libpath="/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice"
checking for main() in -lrice... yes
creating Makefile
make -C t1 all
make[3]: Entering directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/test/ext/t1'
g++ -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. -I/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3 -I/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/ruby/lib/include -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -Wall -g -o t1.o -c t1.cpp
g++ -shared -o t1.so t1.o -L/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice -Wl,-R/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/rice -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -L/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/ruby/lib/lib -lrice -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: /usr/local/lib/libruby-static.a(array.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libruby-static.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [t1.so] Error 1
make[3]: Leaving directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/test/ext/t1'
make[2]: *** [t1_all] Error 2
make[2]: Leaving directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/test/ext'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/test'
make: *** [all-recursive] Error 1
Gem files will remain installed in /tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3 for inspection.
Results logged to /tmp/build_2mw894a3yrw66/vendor/bundle/ruby/1.9.1/gems/rice-1.4.3/gem_make.out
An error occurred while installing rice (1.4.3), and Bundler cannot continue.
Make sure that `gem install rice -v '1.4.3'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git@heroku.com:happytyme-dev.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:happytyme-dev.git'
我已经在本地运行 gem install rice -v '1.4.3' ,一切都很好。我还完成了捆绑更新、捆绑安装、git add 。(Gemfile 和 Gemfile.lock), git commit -m "Creating gems" 但没有任何效果。有任何想法吗?