Euniceadu
2011-Nov-18 15:17 UTC
Rails Installation Error: Failed to build gem native extension.
After installing Ruby, i tried installing Rails and this is the error i got: C:\Users\Eunice>gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb checking for re.h... *** extconf.rb failed *** Could not create Makefile due to some reason, problably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby/bin/ruby C:/Ruby/lib/ruby/1.9.1/mkmf.rb:368:in ''try_do'': The complier failed to generate an executable file. <RuntimeError> You have to install development tools first. from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:452:in ''try_cpp'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:834:in ''block in have_header'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'' from extconf.rb:14:in `<main>'' Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.9.1/gems/ json-1.6.1 for inspection. Results logged to C:/Ruby/lib/ruby/gems/1.9.1/gems/json-1.6.1/ext/json/ ext/parser/gem_make.out -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Norbert Melzer
2011-Nov-18 16:01 UTC
Re: Rails Installation Error: Failed to build gem native extension.
2011/11/18 Euniceadu <euniceadu1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> C:\Users\Eunice>gem install railsDo yourself a favor, dont use windows for railsdevelopment. Just use a linux distribution of your choice... I prefer Ubuntu or LinuxMint. I begun with Ubuntu in a Sun VirtualBox, but after some time I switched completely over to LinuxMint. If you have to use windows, then you could http://railsinstaller.org/ a try. HTH Norbert -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Luis Lavena
2011-Nov-18 16:05 UTC
Re: Rails Installation Error: Failed to build gem native extension.
On Nov 18, 12:17 pm, Euniceadu <eunicea...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> After installing Ruby, i tried installing Rails and this is the error > i got: > > C:\Users\Eunice>gem install rails > Building native extensions. This could take a while... > ERROR: Error installing rails: > ERROR: Failed to build gem native extension. > > C:/Ruby/bin/ruby.exe extconf.rbYou can try using RailsInstaller which includes everything setup for you: http://railsinstaller.org/ The error seems to be caused by the installation of JSON 1.6.1 which lacks binaries for Windows. Since you didn''t provide enough details about the version of Ruby, where you got it (specific to the version, if s RubyInstaller or not) we will be guessing. Some of the answers here might also help you: https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting That section of RubyInstaller wiki covers most of the issues after you installed RubyInstaller and the DevKit. -- Luis Lavena -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ashif
2011-Nov-20 05:37 UTC
Re: Rails Installation Error: Failed to build gem native extension.
Make sure you have configured DevKit properly if you are installing ruby using oneclick ruby installer from http://rubyinstaller.org...try to follow the instructions here https://github.com/oneclick/rubyinstaller/wiki/Development-Kit -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/J-YZgj5KbPoJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.