How to install json gem - Failed to build gem native extension(mac 10.10)
Sad, however, JSON-1.7.7 (and upto 1.8.1) is incompatible with Ruby-2.2.x. As you are using Ruby-2.2.1, it will not work for you.
There are 2 options for you:
- Update your
json
gem to1.8.2
version. -- Preferable - Edit
ruby-2.2.1/ext/json/fbuffer/fbuffer.h
file and replace problematic code withVALUE result = rb_str_new(FBUFFER_PTR(fb), FBUFFER_LEN(fb));
. Look here for details
Error installing json 1.8.3 with ruby 2.4
I ran into the same issue recently as well, try and see if there's a newer version of whatever gem you're using that depends on json 1.8.3. This is happening because Ruby 2.4 unified Fixnum and Bignum into Integer. If you're able to upgrade to json 1.8.5 or higher, it should help fix your problems.
You could also try and update the gem you're using and try to relax the version constraints (I've found this to work with a lot of projects, but not all) like so:
gem 'json', '>= 1.8'
Could not install json.Error occurs in windows.ERROR: Error installing json:ERROR: Failed to build gem native extension
I have re installed ruby and devkit ,now its working fine.Thanks for your comments.
Related Topics
Hardcoded "Require 'Debug'" Can't Find the Sourcefile
What Is a More Ruby-Like Way of Doing This Command
How to Read a Clients Windows Login Name Using Ruby on Rails
How to Create Automatically a Instance of Every Class in a Directory
Incompatible Character Encoding in Rails - How to Just Fail/Skip Sensibly
How to Download File from Google Drive API with Service Account
How to Split a String of Repeated Characters with Uneven Amounts? Ruby
Gitlab: Invocation of Gitlab-Shell
Elegant Way to Only Show Records If They Exist in Rails Erb
Ruby: Calculate Time Difference Between 2 Times
Ruby: Module, Mixins and Blocks Confusing
Restart Rails Server Automatically After Every Change in Controllers
Config Undefined in Environment Specific Configuration Files
How to Use String Methods on Utf-8 Characters
Convert String Numbers( in Word Format) to Integer Ruby
Spring Doesn't Work. [ Uninitialized Constant Spring::Sid::Dl ]