Ruby.wasm is here now, so you can run ruby in the browser. It still a bit big, but it even supports many regular gems. I met up today with a friend who is working on much smaller mruby version. He'll be giving a talk at rubykaigi next month.
I use Ruby.wasm with my own patch. [1][2]
You can use the Javascript API and the syntax is a joy. I used it to make an electron app with videoplayer.[3]
I also ported the rubykoans[4]