because they are not javascript??? you realise that ruby and php still need to interact to JS in the end
so why not use JS directly or build on top of that???? that's what people do