Yeah, but that narrows down your pool of developers a lot. There are a lot more JavaScript developers than there are JavaScript developers who also happen know RoR.
I mean, sure, someone could learn RoR on the job, but in practice, will they actually do it? In all companies I worked for where the frontend and backend languages were different, developers tended to stick to one side of the fence. Developers just don't like context switching.
In my experience any developer worth hiring can do complex frontend work (even by 2015/2016 standards) and backend work. I've never seen a "frontend only" or "backend only" developer.
On the other hand, if a developer cannot figure out Ruby on Rails (or Sinatra, or Django, or Flask, or any of the PHP frameworks), and does not even know SQL, do they really have any business doing server-side web development?
Knowing JavaScript and one server-side web app framework/language is a pretty minimal requirement for a full-stack web developer. It boggles my mind to think that there are people working as professional developers that literally only know JavaScript. Those people should not be doing server-side development.
I mean, sure, someone could learn RoR on the job, but in practice, will they actually do it? In all companies I worked for where the frontend and backend languages were different, developers tended to stick to one side of the fence. Developers just don't like context switching.