If you don't know it, what this does is that it sets up an iframe in which it injects opal generated JS. By "sets up" I mean loads a manifest JS file with the necessary dependencies, served via sprockets. The manifest file contains:
My workaround was to save the opal-jquery.js file from Middleman (via sprockets) as a static file and include it, instead of using the Rails sprockets served version. Ending up with:
Hi!
I'm hammering at porting Opal Playground from it's current implementation with Middleman over to Rails. https://github.com/fkchang/opal-playground
If you don't know it, what this does is that it sets up an
iframe
in which it injectsopal
generated JS. By "sets up" I mean loads a manifest JS file with the necessary dependencies, served via sprockets. The manifest file contains:opal-jquery
works very well in the Middleman version, usingHowever,
opal-jquery
fails to work with the Rails version, usingIn Chrome's console I get:
My workaround was to save the opal-jquery.js file from Middleman (via sprockets) as a static file and include it, instead of using the Rails sprockets served version. Ending up with:
Since
opal-jquery
is at the same gem version, I suspect that something breaks when it's outputted (via sprockets) usingopal
0.8.1