Rails is not creating a new app correctly - conflict with JSON 1.7.7? -
i'm trying learn ruby on rails online tutorial.
[rails version]: rails 3.2.13 [ruby version] : ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]   when execute command:
rails new first_app   i get:
gem::installer::extensionbuilderror: error: failed build gem native extension.          /usr/bin/ruby extconf.rb  mkmf.rb can't find header files ruby @ /usr/share/include/ruby.h   gem files remain installed in /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7 inspection. results logged /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out error occurred while installing json (1.7.7), , bundler cannot continue. make sure `gem install json -v '1.7.7'` succeeds before bundling.   sure enough, ran gem install json -v '1.7.7 listed, results are:
[philippe@localhost rails_projects]$ gem install json -v '1.7.7' building native extensions.  take while...  error:  error installing json:   error: failed build gem native extension.          /usr/bin/ruby extconf.rb mkmf.rb can't find header files ruby @ /usr/share/include/ruby.h   gem files remain installed in /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7 inspection. results logged /home/philippe/.gem/ruby/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out   has seen that?
if in "rpm" system (fedora or red hat) use:
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel   it solved problem me.
Comments
Post a Comment