evdama
evdama

Reputation: 2206

gem install rb-appscript on macos fails / Alfred todo workflow

I'd like to install rb-appscript on my macbook pro running high sierra but it fails for reasons I can't tell

sa@mbp: ~ sudo gem install rb-appscript
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing rb-appscript:
    ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.4.0/gems/rb-appscript-0.6.1
/usr/local/opt/ruby/bin/ruby -r ./siteconf20171117-38586-zi3axn.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.4.2_1/bin/$(RUBY_BASE_NAME)
extconf.rb:44:in `<main>': uninitialized constant Config (NameError)
Did you mean?  RbConfig
               CONFIG

extconf failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.4.0/gems/rb-appscript-0.6.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-17/2.4.0/rb-appscript-0.6.1/gem_make.out
sa@mbp: ~ uname -a
Darwin mbp.home 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
sa@mbp: ~ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
sa@mbp: ~ xcode-select -p
/Library/Developer/CommandLineTools
sa@mbp: ~ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
sa@mbp: ~ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
sa@mbp: ~

Any clues on what the issue is and how to resolve it?

What I actually want to achieve is installing a workflow for alfred that seems to require 'rb-appscript' https://github.com/dv/alfred-omnifocus-workflow

Upvotes: 0

Views: 571

Answers (2)

evdama
evdama

Reputation: 2206

I figured, rb-appscript is the root of the problem. Pity, I really loved the alfred workflow for omnifocus because it was fast getting a task into omnifocus and continue with whatever you were workin on.

Upvotes: 0

brainbag
brainbag

Reputation: 1057

I ran into this problem recently too. The issue is that the rb-appscript gem is very out of date; it's last update was in 2011. It does not work with modern Mac OS. There's a modern replacement for it called rb-scpt. At the time of this post, it was last updated 9 days ago. I am using it in an app that is running at this very moment in Sierra, so I can confirm that it works.

https://github.com/BrendanThompson/rb-scpt

Upvotes: 1

Related Questions