ruby - Cannot install gem - make is not recognized as an internal or external command operable program or batch file -


i wanted install rspec-rails gem ruby 1.9.3 on windows 7. got errors saying json libraries not installed. so, used instructions below solve it. source = the 'json' native gem requires installed build tools

  1. download [ruby 1.9.3][2] [rubyinstaller.org][3]
  2. download devkit file [rubyinstaller.org][3]
    • for ruby 1.9.3 use [devkit-tdm-32-4.5.2-20110712-1620-sfx.exe][4]
  3. extract devkit path c:\ruby193\devkit
  4. run cd c:\ruby193\devkit
  5. run ruby dk.rb init
  6. run ruby dk.rb review
  7. run ruby dk.rb install

to return problem @ hand, should able install json (or otherwise test devkit installed) running following commands perform install of json gem , use it:

gem install json --platform=ruby ruby -rubygems -e "require 'json'; puts json.load('[42]').inspect" 

when execute above first step, error -

c:\ruby193\devkit>gem install json --platform=ruby temporarily enhancing path include devkit... building native extensions.  take while... error:  error installing json:         error: failed build gem native extension.          c:/ruby193/bin/ruby.exe extconf.rb creating makefile  make 'make' not recognized internal or external command, operable program or batch file. 

gem files remain installed in c:/ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1 inspection. results logged c:/ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

i trying solve above error -

'make' not recognized internal or external command, operable program or batch file. using make not recognized internal or external command - qt sdk - windows

if knows how fix this, please me. have been struggling install gems , failing many days. wondering if ruby difficult.

the doskey approach failed !!!

i did - install mingw , installed developer tools , base stuff. added c:\mingw\bin environment variables find mingw32-make.exe. then, ran doskey make=mingw32-make followed ruby command. got same error. guessing ruby code spawning off hidden cmd window , thats why command not working. doskey valid in cmd window in run it.

next step - not nice, but, i'll change mingw32-make.exe make.exe , see.

failed again new error -

temporarily enhancing path include devkit... building native extensions. take while... error: error installing json: error: failed build gem native extension.

    c:/ruby193/bin/ruby.exe extconf.rb creating makefile 

make generating generator-i386-mingw32.def compiling generator.c in file included generator.c:1:0: ../fbuffer/fbuffer.h:5:18: fatal error: ruby.h: no such file or directory #include "ruby.h" ^ compilation terminated. makefile:204: recipe target 'generator.o' failed make: *** [generator.o] error 1

gem files remain installed in c:/ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1 inspection. results logged c:/ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

what do ?

i have tried setup ruby on rails on windows system, although there 1 click installers install ruby , rails, many of gems rely on posix based operating system compiled, making near impossible actual work on windows.

my advise linux system, perhaps unbuntu on system , dual boot, or virtual pc software, one, or of other options, , try installing ruby there.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -