You can only pass a single option to the command named in in the shebang line. Or truly spoken, if you pass multiple arguments, they will not get exploded but passed as single argument. In this case like:
/usr/bin/env 'ruby -s'
But the file 'ruby -s'
does not exist. That's why the error message.
Following the Ruby's man page, you are supposed do use the following shebang:
#! /usr/bin/ruby -s
# :prints "true" if invoked with `-xyz' switch.
print "true\n" if $xyz
You need to call ruby directly instead of using /usr/bin/env
. This is a drawback, but doing so, you can call the script like this:
./script.rb -xyz