(Doc) Chef 10.16.4 install fails w/ Ruby 2.2.2 due to json gem
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 30/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- documentation
Research direction
No target file, test, or entry point is named. Start by locating the repository's Chef installation documentation and compare it with the reported Ruby 2.2.2/json-1.6.1 failure and workaround; done means the exact version combination, failure, and environment-specific workaround are documented.
Written by the indexing model from the issue text.
Description
Some users attempting to install this exact version combination may run into a problem where the json gem is failing to build. For example:
gem install chef --version="10.16.4"
[snip]
Fetching: json-1.6.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing chef:
ERROR: Failed to build gem native extension.
/home/jaustinhughey/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150529-1424-1rmvbxh.rb extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:0:
generator.c: In function ‘cState_aref’:
generator.h:134:27: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
JSON_Generator_State *state; \
^
generator.c:736:5: note: in expansion of macro ‘GET_STATE’
GET_STATE(self);
^
generator.c: In function ‘fbuffer_to_s’:
generator.c:952:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
generator.c:952:20: warning: initialization makes integer from pointer without a cast
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
Makefile:237: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/jaustinhughey/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/json-1.6.1 for inspection.
Results logged to /home/jaustinhughey/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/json-1.6.1/gem_make.out
In my case I was able to fix this with:
rbenv install 2.1.6
rbenv global 2.1.6
gem install bundler json
rbenv rehash
gem install chef --version="10.16.4"
Note, of course, I'm using rbenv. Modify those commands to suit your Ruby environment manager of choice, or don't forget sudo if you're rolling raw.
- Dominant language
- Ruby
- Stars
- 3
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
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.
More from engineyard/eydr
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
engineyard/eydr#7 ·
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100