What about Rubocop rules?

The first offence I don’t get. this shebang is the proper syntax and my .rb script executes.

The second one, again, I don’t get it, this shebang is correct. what is the offence ?

The next three are similar. should I make the change ? in the Ruby course here on Codacademy double quotes are used. is there a config file one can edit for Rubocop ?

Hi,
I think the first issue is a file issue, and not ruby itself.
run this in the directory to see the permissions:

ls -l

You need and “x” to represent execute. Something like “rwx” not just “rw-” to permit the file to run by itself, without having to go like this every time:

ruby script.rb

The command “chmod” changes file permissions. Have a read through “man chmod” or “chmod --help”.

1 Like

Yup, did chmod on the file, and added a string literal entry at the top of the file for the shebang.

The other one I just left alone.