gem install rails build error failed to build gem native extension

笑着哭i 提交于 2019-12-25 07:49:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!