I am trying to install gem json and getting error for json.
I'm running:
- Windows 8.1 (64 bit)
- Ruby: ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
- gem: 1.8.2
D:\GIT\calabash>gem install json -v '1.8.3'
Building native extensions. This could take a while...
The system cannot find the path specified.
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
D:\GIT\calabash>
Its a late response, but may it helps someone else. to install json '1.8.3' it requires packages 'libgmp3-dev'.
Use following steps:
If you installed Rails through RailsInstaller, try this -
https://gist.github.com/luislavena/f064211759ee0f806c88
It's a pretty common bug for RailsInstaller currently.
For anyone who has this issue on Sierra, I solved the problem through this thread: https://teamtreehouse.com/community/installing-ruby-on-mac-got-error
Coles notes version is that after updating to most recent version of XCode, I had to accept the terms for the XCode command line tools. See them/agree to them by running:
After I did that, everything installed as expected.
To help you here are some steps to follow in order to install your gem locally:
gems
cmd
console (click on start button, select Ruby then select "Start command prompt with Ruby")cd
to the gems folder. If the path to the folder isC:\Desktop\gems
, write the command:cd C:\Desktop\gems
then click "Enter".To install the gem run the following command:
I tried it and it worked for me, hopefully it will work for you.
Result:
Second way:
Include the whole path of the gem in the command:
For me here is the result. (This time with the json-1.8.2.gem):