Fairly new to this so I've been trying to awhile to figure this out but unable to locate an answer.
gem update --system
When installing the rb-appscript I get the following error.
gem install rb-appscript
Building native extensions. This could take a while...
ERROR: Error installing rb-appscript: ERROR: Failed to build gem native extension.
/Users/Dz/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150719-5167-en4sxa.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=/Users/Dz/.rbenv/versions/2.2.2/bin/$(RUBY_BASE_NAME)
extconf.rb:44:in `': uninitialized constant Config (NameError)extconf failed, exit code 1
Gem files will remain installed in /Users/Dz/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rb-appscript-0.6.1 for inspection.
Results logged to /Users/Dz/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/rb-appscript-0.6.1/gem_make.out
First, I hope you're enjoying Ruby. :-)
The
Config
module was renamed and deprecated toRbConfig
around Ruby 1.9 (not sure when exactly).Config
was removed entirely in Ruby 2, hence theuninitialized constant Config
fatal error.If you'd happened to be using 1.9.x instead of 2.2.2, you would have seen a deprecation warning, which probably would have tipped you off.
You could probably use Ruby 1.9 if you want to use
rb-appscript
, but I've never used that gem, so I can't speak to it specifically.(You can easily install a version of 1.9 with
rbenv
and itsruby-build
plugin.)