rubyonwindowsguides / rubyonwindowsguides.github.com

Ruby on Windows Guides Book
14 stars 6 forks source link

2 errors while doing gem install rails #3

Closed kanakiyajay closed 11 years ago

bosko commented 11 years ago

It would be good if you can give more details and describe what is the error in the text.

kanakiyajay commented 11 years ago

While doing

gem install json --platform=ruby

I get this error

Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension.

C:/ruby192/bin/ruby.exe extconf.rb

creating Makefile

make 'make' is not recognized as an internal or external command, operable program or batch file.

Gem files will remain installed in C:/ruby192/lib/ruby/gems/1.9.1/gems/json-1.8. 0 for inspection. Results logged to C:/ruby192/lib/ruby/gems/1.9.1/gems/json-1.8.0/ext/json/ext/ge nerator/gem_make.out

UPDATE 1 : On googling I found that Devkit & Ruby should have Paths without spaces , I updated that but still getting the above error

bosko commented 11 years ago

This has nothing to do with the book. You do not have DevKit installed. Please read chapter about it http://rubyonwindowsguides.github.io/book/ch02-04.html.

kanakiyajay commented 11 years ago

I had Devkit installed .... ran devkitvars.bat still on running gcc --version it gave "gcc" is not an internal or external command. It seems like gcc does not work smoothly with windows 64. I finally installed Ruby on Rails using railsinstaller.org

It would be great if you give a reference to railsinstaller in your guide. Thanks.

bosko commented 11 years ago

I don't know which version of DevKit you have installed. You should check http://rubyinstaller.org/downloads/ and Rubyinstaller mailing list. @luislavena has explained it several times. If you follow all the steps from the book DevKit will definitely work.

I have left Railsintaller, which is excellent, out of the book on the purpose. It does help you install Rails easily but purpose of the book is not to give reader few recipes how to install Rails. For that, book is not needed. My idea about the book was to learn reader how everything works under the hood and to explain most critical parts so he does not have problem next time he must install Ruby or Rails on Windows.