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