2

My OS is Windows 7 64x Ultimate. I try to install the json gem like this:

gem install json -v '1.8.1' 

But I have a problem:

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:/Ruby193/bin/ruby.exe -r ./siteconf20150220-2012-1uff8mn.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/js on-1.8.1/gem_make.out 

How can install json 1.8.1?

2
  • 1
    What does C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js on-1.8.1/gem_make.out say? Commented Feb 20, 2015 at 19:03
  • What version of rubygems are you using? Commented Feb 20, 2015 at 19:50

2 Answers 2

1

This seems to be a known bug with Rubygems. Take a look at the issue page for this bug over on github.

It has not yet been fixed but will hopefully be fixed soon. For now, it seems most people have to downgrade to rubygems 2.3.0 to get it to work on Windows. That should solve your problem.

Sign up to request clarification or add additional context in comments.

Comments

0

You have to update your ruby gem to the newest version

To check what your ruby in now

$Ruby -v 

Update it to ruby version 2.3.7

$rvm list known $rvm install 2.3.7 $rvm use 2.3.7 --default $gem install bundler 

Check out this video https://www.youtube.com/watch?v=lsNXc3uQ2AA&lc=z22pvls4asawvhi5004t1aokgq0e4p2vb1qpp3w3z252bk0h00410.1528974099408204 Let me know if does that help!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.