zhaocai / alfred2-keylue-workflow

Keylue (Key Clue): Alfred 2 Workflow for Menu Bar and Keyboard Maestro Hot Key Search
http://zhaocai.github.io/alfred2-keylue-workflow
48 stars 4 forks source link

does not work with high Sierra Alfred 3 now #4

Open hugh1li opened 6 years ago

efpe commented 6 years ago

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 commented 6 years ago

Okay, easy-peasy.

hugh1li commented 6 years ago

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

ddaanet commented 6 years ago

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.

michaelwills commented 6 years ago

@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.