How can I compile Ruby to Javascript? [closed]

╄→尐↘猪︶ㄣ 提交于 2019-12-03 04:39:08
Ajedi32

As far as I can tell, Opal is the best Ruby to JS converter/compiler out there right now. Here you can see it in action.

It isn't perfect, but it works most of the time and unlike older projects such as RubyJS, Opal is still being actively developed.

I know about http://hotruby.yukoba.jp/ but have never used it

maybe this helps: http://opalrb.org/ haven't tried it though

I recently heard about a project named "Johnson" which embeds the Spidermonkey JavaScript interpreter inside Ruby. http://github.com/jbarnette/johnson

You could then eval some javascript inside ruby.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!