0
我正尝试通过在线教程学习Ruby on Rails。Rails没有正确创建新的应用程序 - 与JSON 1.7.7冲突?
[rails version]: Rails 3.2.13
[ruby version] : ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
当我执行命令:
rails new first_app
我得到:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
Gem files will remain installed in /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7 for inspection.
Results logged to /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.
果然,我跑gem install json -v '1.7.7
为上市,但是结果是:
[[email protected] rails_projects]$ gem install json -v '1.7.7'
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
Gem files will remain installed in /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7 for inspection.
Results logged to /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
有没有人看到了吗?
将结果中记录的日志记录到/home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out成为要点 – rovermicrover 2013-04-09 01:06:25
检查此链接http://stackoverflow.com/questions/11058952/why-do-i-get-an-error-installing-the-json-gem-in-ubuntu – Shrikant1712 2013-04-09 05:27:04