0

我想在运行 high sierra 的 macbook pro 上安装 rb-appscript,但由于我不知道的原因它失败了

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: ~

关于问题是什么以及如何解决的任何线索?

我真正想要实现的是为 alfred 安装一个似乎需要“rb-appscript”的工作流https://github.com/dv/alfred-omnifocus-workflow

4

2 回答 2

1

我最近也遇到了这个问题。问题是 rb-appscript gem 已经过时了。它的最后一次更新是在 2011 年。它不适用于现代 Mac OS。它有一个现代替代品,称为 rb-scpt。在这篇文章的时间,它最后一次更新是在 9 天前。我正在 Sierra 中正在运行的应用程序中使用它,因此我可以确认它可以正常工作。

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

于 2017-11-17T12:31:11.357 回答
0

我想,rb-appscript 是问题的根源。遗憾的是,我真的很喜欢全焦点的 alfred 工作流程,因为它可以快速将任务转移到全焦点并继续你正在处理的任何事情。

于 2017-11-17T19:50:00.007 回答