Hi what I'm trying to do is run a bash script when someone clicks on an image. This is being done within an .erb view in Ruby on rails and the server this is running does have php installed. Thank you for reading and have a wonderful day!
<%= image_tag("longbeards.jpg", :class => "homepage-leftsidepicture", onclick:'<?php exec("/home/ncs/slowloris.sh");?>' ) %>
EDIT: I was unable to use the onclick statement from the first answer I got. However, I made a javascript function that calls the statement. Now I get this error that says "No route matches {:action=>"call_script", :controller=>"script"}, missing required keys: [:script_id]"