alfred2-keylue-workflow icon indicating copy to clipboard operation
alfred2-keylue-workflow copied to clipboard

does not work with high Sierra Alfred 3 now

Open hugh1li opened this issue 7 years ago • 5 comments

hugh1li avatar Oct 10 '17 14:10 hugh1li

I guess you need to find a way to allow the script to control your mac. I did not figure it out how to do it yet (in 2 minutes).

efpe avatar Oct 12 '17 15:10 efpe

Okay, easy-peasy.

  • Go to Security & Privacy in the System Preferences
  • Add Alfred 3 to the list in the Accessibility tab
  • Profit

efpe avatar Oct 12 '17 15:10 efpe

Actually I did that long before. This workflow does not work only after upgrading to high Sierra.

hugh1li avatar Oct 13 '17 23:10 hugh1li

Security & Privacy is not the problem. I have the same issue here, and when debugging the workflow, I get:

[2017-10-17 22:22:44][ERROR: input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- alfred (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from ./main.rb:8:in `<main>'

So the problem is High Sierra has upgraded ruby to 2.3 and the packaged workflow only has bundles for 1.8 and 2.0.0. Not being familiar with the ruby ecosystem, I was completely unable to figure out how to fix that.

Symlinking bundle/ruby/2.3.0 to 2.0.0 within the wokrflow appears to fix the problem, but there ought to be some more sensible way, involving bundle, rake or whatever.

ddaanet avatar Oct 17 '17 20:10 ddaanet

@ddaanet thanks for that tip! I just upgrade (finally) and lost top. 😱

The fix:

  1. open the workflow in terminal
  2. make sure you have bundler installed - http://bundler.io/
  3. in the workflow directory run bundle install --standalone which installs the 2.3.0 gems in bundle/ruby/2.3.0.
  4. 💵 top has returned.

michaelwills avatar Apr 25 '18 20:04 michaelwills