Your script outputs “local check” output. It is possible to run this script with this output within a normal CMK agent.
What you also see the script uses the complete output in your configuration as only text output without using the status code at the start and the performance data.
This location is a little bit strange for the script file. In the default setup there is no Ruby script there
All your own classic checks (this is no classic check) should be copied to “~/local/lib/nagios/plugins/”