我查看了很多这样的错误,但没有一个解决方案适合我。直到几天前我才让 Rails 工作,但我真的不明白它出了什么问题。捆绑安装新应用程序,它会提供:
Installing json (1.7.7) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
generating generator-i386-mingw32.def
make: *** [generator-i386-mingw32.def] Error 253
Gem files will remain installed in C:/RailsInstaller/Ruby193/lib/ruby/gems/1.9.1
/gems/json-1.7.7 for inspection.
Results logged to C:/RailsInstaller/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.7.7/
ext/json/ext/generator/gem_make.out
An error occured while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.
我安装了 DevKit,在使用 RailsInstaller 重新安装了所有内容之后,然后自行安装了 DevKit。我已经安装了 MinGW。
我对 Rails 并不陌生,我无法弄清楚出了什么问题,几天前一切都正常......而且我无法想到我安装的东西可能会产生冲突
谢谢。
编辑解决方案:我终于通过重新安装操作系统让它工作了(发布此消息几天后):) 然后我明白了再次尝试并反对命令行,错误是 ansicon,使通过命令行和 Windows 服务的每个可执行文件崩溃。我尝试过的每个最新版本都会出现此问题,我无法解释。
最佳答案
在 Rubyinstaller wiki 上查看此故障排除指南:https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails_comspec_autorun
我的案例是在更新 Windows 后,“场景 B”实现了“技巧”。
关于ruby-on-rails - Json 未安装在 Windows 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14921688/