[英]ERROR: Failed to build gem native extension when installing rails
I'm on windows and trying to install rails. 我在Windows上试图安装rails。 but I get the following error message:
但是我收到以下错误消息:
Z:\AlexL\My Documents\rails>gem install rails
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20150211-3312-5ie7vd.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.
2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js
on-1.8.2/gem_make.out
Ruby version is: ruby 1.9.3p484 Ruby版本是:ruby 1.9.3p484
I've got this devkit installed DevKit-tdm-32-4.5.2-20111229-1559-sfx in this folder: 我已经在以下文件夹中安装了这个devkit DevKit-tdm-32-4.5.2-20111229-1559-sfx:
C:\\Ruby193\\DevKit\\ C:\\ Ruby193 \\的devkit \\
Not sure what else is wrong? 不确定还有什么问题?
Looks the same as the issue being discussed here . 看起来与此处讨论的问题相同。
Apparently, there is a problem with Ruby 1.9.3 and newer RubyGems versions on Windows machines. 显然,Windows计算机上的Ruby 1.9.3和较新的RubyGems版本存在问题。 Their quick-fix solution was to downgrade to an earlier version of RubyGems.
他们的快速解决方案是将其降级到RubyGems的早期版本。
gem update --system 1.8.29
Once you have done that, confirm that gems -v
returns 1.8.29
and try your command again. 完成此操作后,确认
gems -v
返回1.8.29
并再次尝试输入命令。
Otherwise, you can upgrade to Ruby 2.X, which should also resolve this problem. 否则,您可以升级到Ruby 2.X,这也可以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.