问题
My main goal is to make Redmine work along with WAMPServer. I followed these steps : How to install Ruby on Rails alongside WampServer?
When i have to install rails, a build error seems to happen in my command line
Here's my error :
c:\wamp\ruby\gem install rails
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing tzinfo:
ERROR: Failed to build gem native extension.
C:/wamp/ruby/bin/ruby.exe extconf.rb creating Makefile
make gcc -I. -I. -IC:/wamp/ruby/lib/ruby/1.8/i386-mingw32 -I. -g -O2 -DFD_SETSIZE=256 -c atomic_reference.c atomic_reference.c: In function 'ir_compare_and_set': atomic_reference.c:75:2: error: #error No CAS operation available for this platform make: *** [atomic_reference.o] Error 1
I use Windows 7 64 bits and my versions are ruby 1.8.7, gem 1.3.7
回答1:
Are you able to install any gems at all? If not, then possibly its a problem with the configuration.
If you installed the devkit in the standard way, then the culprit could be incorrect Autorun regex key OR the incorrect command processor set by other tools that interferes with ruby gem installations.
Try the instructions here, and your issue should be solved: https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails_comspec_autorun
Let know if you still get the error(s).
来源:https://stackoverflow.com/questions/21608611/gem-install-rails-build-error-failed-to-build-gem-native-extension