Windows provides a batch file for the connector which can be utilized instead.
To work around the error, run the command below that corresponds to your connector type. Notice the lack of the ruby command at the beginning of the line.
ca_agile_central2_jira_connector.rb <config.xml> -1
ca_agile_central2_hpalm_connector.rb <config.xml> -1
Note that this method requires you to have .rb files associated with the ruby interpreter in your environment