ruby-on-rails – 带有RailsInstaller的Ruby,无法在Windows上构建gem原生扩展

在使用RailsInstaller在
Windows上安装
Ruby Rails之后,我无法安装任何需要构建本机扩展的gem.错误:

C:\Users\Admin>gem install rdiscount
Building native extensions.  This could take a while...
ERROR:  Error installing rdiscount:
        ERROR: Failed to build gem native extension.

        C:/Rails/Ruby1.9.2/bin/ruby.exe extconf.rb

Gem files will remain installed in C:/Rails/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/r
discount-1.6.8 for inspection.
Results logged to C:/Rails/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rdiscount-1.6.8/ex
t/gem_make.out

gem_make.out的内容:

C:/Rails/Ruby1.9.2/bin/ruby.exe extconf.rb

我已经通过了this troubleshooting page,但它没有解决这个错误.
Ruby似乎无法生成子进程,因为当我手动运行extconf.rb时,它可以工作.

路径:

C:\Rails\DevKit\bin;C:\Rails\DevKit\mingw\bin;C:\Rails\Git\cmd;C:\Rails\Ruby1.9.2\bin;C:\Program Files\AMD APP\bin\x86;C:\Program Files\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\

我希望有人可以帮我解决这个问题.

最佳答案 除非你有一个非常有说服力的理由在Windows上本地运行,否则我会安装
VirtualBox并运行Ubuntu或你最喜欢的Linux for Rails开发.事情最终将会顺利进行.

点赞