我试图将我的本地数据库推送到Heroku并收到此错误:
...Taps Server Error: PGError: ERROR: time zone displacement out of range:...
稍后我发现有一些谷歌搜索我发现ruby 1.9.2
并没有发生此错误(因为在Windows上)我必须安装pik
以便在1.9.3旁边运行1.9.2。所以我安装了pik和ruby 1.9.2。
但是,当我尝试在rails
上安装1.9.2
时,我收到此错误:
...ERROR: Failed to build gem native extension...
经过大量谷歌搜索后,我遇到了以下情况:
非常感谢任何帮助!
编辑:
完整错误堆栈跟踪:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
creating Makefile
make
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -
I/C/Ruby192/include/ruby-1.9.1 -I. -DJSON_GENERATOR -O3 -g -Wextra -Wno-unused-parameter -Wno-par
entheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -O3 -Wall -O
0 -ggdb -o generator.o -c generator.c
make: gcc: Command not found
make: *** [generator.o] Error 127
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.7.6 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.7.6/ext/json/ext/generator/gem_make.out
答案 0 :(得分:2)
错误讯息的相关部分是gcc: Command not found
;所以编译器不能在本地编译代码。
如果您的计算机上已经安装了gcc
,请确保它已包含在PATH
中。
检查How to install gcc on windows 7 machine?以获取有关如何在Windows上安装gcc的指导。