Error with extension requieres shebang

I have an old extension that today was try to install on Popclip but is returning this error:

Executable script ‘script.rb’ requires
shebang !#)

Extension: Quote.popclipext

I remember that it worked before but now it refuses to install.

Any idea what is causing the problem?

This is the content of the file script.rb:

#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby

prefix = "<p style="color:#6B8E23">"
suffix = "</p>"
input = ENV['POPCLIP_TEXT']

space = input.match(/^([\s\n]*)\S.*?([\s\n]*)$/m)
print "#{space[1]}#{prefix}#{input.strip}#{suffix}#{space[2]}"

Thanks

Welcome to the forum @denisvjcr . It looks OK because that script does have a shebang. I’d need to see the actual zipped extension to figure out what is going wrong.

Also can you confirm your PopClip version.

Hi Nick

I found the solution in google: add “#!/bin/bash” in the first line, that solved the problem and let me import the extension.

This is the versión I have installed: 2023.7 (1004151)

Have a nice weekend.

That’s super-confusing because you posted a Ruby script, not a bash script. There must be some key information I am missing. But anyway, I’m glad you got it working!