Gem :: Ext :: BuildError:错误:无法构建gem原生扩展--Rails 4

时间:2015-01-16 06:45:10

标签: ruby-on-rails ruby-on-rails-4

`Gem::Ext::BuildError: ERROR: Failed to build gem native extension.`

`C:/Ruby193/bin/ruby.exe -r ./siteconf20150116-5956-smcp65.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`

每次创建新的rails应用程序时都会发生此错误。运行命令rails new Blog后,我收到此错误。

1 个答案:

答案 0 :(得分:1)

我在执行bundle install时遇到了同样的错误。结果是it's a known issue,但修复程序要到RubyGems 2.5才会出现。与此同时,降级到v2.3.0应该是一个合适的解决方法:

> gem update --system 2.3.0