-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$runtime is not defined #12
Comments
Hey. How are you compiling the code (ruby tools? altjs.org?)? Also, can you paste the code that it is generating? |
I compile browser.rb with this command: I've updated my browser.js file: https://gist.github.com/1020856 Of course, I use opal edge version (git clone). Thank you again. Great piece of work! |
Ooooops! I closed this issue by mistake! |
Ahhhhh, it seems that the |
So I've just committed a fix for this at 102a979. You need to pull the latest changes, regenerate opal.js or opal.dev.js (either will do) and recompile your file with that same command you used before. The generated code is now properly wrapped and will be run directly. Let me know if this solves the issue. |
Great! Opal rocks! Thank you! |
Glad Its working. Just as a follow up, I've just pushed b1f5a1f to master which adds some more build options to the
Which outputs the code to |
Opal example works fine for me but if I try precompile ruby code (browser.rb) I get this error:
$runtime is not defined (in precompiled browrser.rb, I called browser.js)
I use HTML code like this:
I've tried removing opal.dev.js, I've tried rquery.js (from homepage) but I always get the same error.
Any help? Thank you in advance.
The text was updated successfully, but these errors were encountered: