Alfred-Colors-workflow icon indicating copy to clipboard operation
Alfred-Colors-workflow copied to clipboard

Cannot load chunky_png

Open natejump24 opened this issue 3 years ago • 11 comments

I am running Alfred v4.6.1 on an M1 Max MacBook Pro and I am running into the following issue:

[21:26:55.746] Logging Started...
[21:27:07.846] Colors[Script Filter] Queuing argument '#'
[21:27:08.007] Colors[Script Filter] Script with argv '(null)' finished
[21:27:08.011] ERROR: Colors[Script Filter] Code 1: <internal:/opt/homebrew/Cellar/ruby/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- chunky_png (LoadError)
	from <internal:/opt/homebrew/Cellar/ruby/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from colors.rb:4:in `<main>'

I have Ruby v3.0.3 and chunky_png installed so thinking it may be a symlink issue?

➜  ~ ruby -v
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [arm64-darwin21]

➜  ~ gem list --local | grep chunky_png
chunky_png (1.4.0)

Any ideas?

Thanks in advance :)

natejump24 avatar Dec 17 '21 09:12 natejump24

Maybe something wrong with PATHS. Can u show me the output of the gem environment?

g1eny0ung avatar Dec 18 '21 15:12 g1eny0ung

image

sungentim avatar Feb 09 '22 01:02 sungentim

image

sungentim avatar Feb 09 '22 01:02 sungentim

@sungentim Can u show me the output of the gem environment?

g1eny0ung avatar Feb 09 '22 02:02 g1eny0ung

image

sungentim avatar Feb 09 '22 23:02 sungentim

Seems ruby and gem have mismatched versions. You can see gem is from the rvm manager but the workflow expects homebrew installed ruby.

The solution is very ez, you can edit the workflow script to replace the corresponding bin/ruby if it's not from homebrew:

image

g1eny0ung avatar Feb 10 '22 03:02 g1eny0ung

Seems ruby and gem have mismatched versions. You can see gem is from the rvm manager but the workflow expects homebrew installed ruby.

The solution is very ez, you can edit the workflow script to replace the corresponding bin/ruby if it's not from homebrew:

image
iShot2022-05-16 17 26 13 can't work

LevyLizzz avatar May 16 '22 09:05 LevyLizzz

@LevyLizzz Should be placed in else because your machine is an arm architecture.

g1eny0ung avatar May 16 '22 09:05 g1eny0ung

tried it, can' work eithe iShot2022-05-16 17 53 03 r

LevyLizzz avatar May 16 '22 09:05 LevyLizzz

@LevyLizzz Turning on debug mode may show why the error is occurring:

image

g1eny0ung avatar May 16 '22 10:05 g1eny0ung

@g1eny0ung solved, appreciate it!

LevyLizzz avatar May 17 '22 02:05 LevyLizzz