Can't install gem json v 1.8.6
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 32
- Forks
- 5
- Avg merge
- 14h 17m
- Merged PRs (30d)
- 1
Description
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 foundextconf 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.hextconf 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...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported bundle install and gem install json -v '1.8.6' failures with the Ruby snap package. Compare the /snap/bin/ruby and //bin/ruby paths and the missing /snap/ruby/109/lib/ruby/include/ruby.h headers; done means the json gem installs successfully for this setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100