Skip to content

Can't install gem json v 1.8.6 #14

@choallin

Description

@choallin

I have to work on an old rails 4.2 codebase. I have installed Ruby 2.3 as a snap package - I am trying to avoid rvm.
Now, when I run bundle install it complains that it can't install the json gem. Here is the error message:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/user/.gem/gems/json-1.8.6/ext/json/ext/generator
//bin/ruby -r ./siteconf20190430-29073-znwkkd.rb extconf.rb
sh: 1: //bin/ruby: not found

extconf failed, exit code 127

When I try to install just the gem with 'gem install json -v '1.8.6' --source 'https://rubygems.org/'' I get this error:

ERROR: Error installing json:
ERROR: Failed to build gem native extension.

current directory: /home/user/.gem/gems/json-1.8.6/ext/json/ext/generator
/snap/bin/ruby -r ./siteconf20190430-30141-z86zxd.rb extconf.rb
mkmf.rb can't find header files for ruby at /snap/ruby/109/lib/ruby/include/ruby.h

extconf failed, exit code 1

So, as far as I can tell the native extension is looking in the wrong directory for the ruby headers - I guess...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions