Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with Ruby gem install

I am trying to install json on windows as follows, but its not working. Please help me with possible resoultion for the same.

C:\Ruby193\bin>gem install --local json-1.8.1.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing json-1.8.1.gem:
        ERROR: Failed to build gem native extension.

    C:/Ruby193/bin/ruby.exe -r ./siteconf20140725-4216-11o740j.rb extconf.rb
creating Makefile

make  clean
Makefile:165: *** target pattern contains no `%'.  Stop.

make
Makefile:165: *** target pattern contains no `%'.  Stop.

make failed, exit code 2

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.8.1/gem_make.out
like image 368
sakura Avatar asked Jul 25 '14 08:07

sakura


1 Answers

RubyGems 2.4.1 will not build native extensions in Ruby version 1.9.3 and earlier on Windows.

You will need to downgrade RubyGems to 1.8.29. To do this run the following command:

gem update --system 1.8.29

Check gem version:

gem -v
1.8.29

Now try your command again:

gem install --local json-1.8.1.gem

ref: https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion

like image 77
Rots Avatar answered Sep 29 '22 13:09

Rots