OTask
OTask copied to clipboard
Support for Ruby 2.2.0 with system-wide Chruby
Otask worked great on Ruby 2.1.5 running with Chruby. When I try to install Otask while running Ruby 2.2.0 with Chruby, however, I get the following output:
~ gem install otask
Building native extensions. This could take a while...
ERROR: Error installing otask:
ERROR: Failed to build gem native extension.
/Users/christopherwatson/.rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150131-6600-1qporwq.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
--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=/Users/christopherwatson/.rubies/ruby-2.2.0/bin/$(RUBY_BASE_NAME)
extconf.rb:44:in `<main>': uninitialized constant Config (NameError)
extconf failed, exit code 1
Gem files will remain installed in /Users/christopherwatson/.gem/ruby/2.2.0/gems/rb-appscript-0.6.1 for inspection.
Results logged to /Users/christopherwatson/.gem/ruby/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/rb-appscript-0.6.1/gem_make.out
+1, getting a rather similar error. I don't use chruby though.
INSERT shiin ~ gem install otask
Fetching: tins-1.3.5.gem (100%)
Successfully installed tins-1.3.5
Fetching: amatch-0.3.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed amatch-0.3.0
Fetching: rb-appscript-0.6.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing otask:
ERROR: Failed to build gem native extension.
/usr/local/opt/ruby/bin/ruby -r ./siteconf20150413-75690-1adtv2d.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
--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=/usr/local/Cellar/ruby/2.2.1/bin/$(RUBY_BASE_NAME)
extconf.rb:44:in `<main>': uninitialized constant Config (NameError)
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.2.0/gems/rb-appscript-0.6.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/rb-appscript-0.6.1/gem_make.out
Config
was replaced by RbConfig
in Ruby 2.2.0
(according to: https://github.com/chef/ohai/issues/453).
Does that mean otask could be updated to use RbConfig?
Hey @cwonrails, @FunTimeCoding, and @twe4ked! :wave: Not sure if this will help resolve this particular issue, but #15 switched a dependency in this OTask that was causing similar build failures for me. The fix hasn't gotten to rubygems.org yet, but you can still build this gem from source and install it manually. I dropped some quick steps into this gist in case they're helpful at all.