Internal extension error setting JSON gem

I installed the Brightbox Ruby 2.1.0 apt package and ran into my own compilation error installing the package json.

$ sudo gem install json -v '1.8.1'

Fetching: json-1.8.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing json:
ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

I installed ruby2.0-dev, as mentioned here , but it puts the headers in another folder (/ usr / include / ruby- 2.0.0 / ruby, and copying them to / usr / lib / ruby ​​/ include did not help). Any idea how to install this stone?

+4
source share
1 answer

I assume that you will need to install the ruby2.1-dev package, not ruby2.0-dev if you are using Ruby 2.1. However, I have not used Brightbox packages, so I just assume that I'm scared.

+5

Source: https://habr.com/ru/post/1528170/


All Articles