Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninitialized constant Config (NameError) while installing gem for ruby version >= 2.2.x #50

Open
jyothu opened this issue Jun 28, 2017 · 2 comments

Comments

@jyothu
Copy link

jyothu commented Jun 28, 2017

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

/home/jyothu/.rvm/rubies/ruby-2.2.4/bin/ruby -r ./siteconf20170628-12526-wz2lr4.rb extconf.rb

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/jyothu/.rvm/rubies/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
extconf.rb:25:in `

': uninitialized constant Config (NameError)

@jyothu
Copy link
Author

jyothu commented Jun 28, 2017

The reason behind this is,

Using ::Config for detecting the various config settings which are populated into node[:languages][:ruby] has been deprecated since 1.9.3. In ruby 2.2.0, this has been removed. Now its ::RbConfig.

@jyothu jyothu changed the title uninitialized constant Config (NameError) while installing gem for ruby verstion >= 2.2.x uninitialized constant Config (NameError) while installing gem for ruby version >= 2.2.x Jun 28, 2017
@binarydev
Copy link

For anyone else that comes here looking for an answer like me, the issue is that the thrift dependency (v0.9) currently can't compile with a Ruby version >= 2.2, but the publicly available version of this rbhive gem still requires it. Instead, you need to use gem install rbhive -v 1.0.3.pre or for a Gemfile gem 'rbhive', '~> 1.0.3.pre' in order to get a newer version of rbhive that uses thrift v0.11, which installs fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants