Uncaught NoMethodError: undefined method `Native' for main

17 views
Skip to first unread message

keshav.b...@gmail.com

unread,
Jan 17, 2015, 7:37:40 AM1/17/15
to opa...@googlegroups.com

app.rb file ---
require 'native'
require 'opal'
$window = Native('window')
window.alert("hello world")
---
this ruby scripts gives the following error in jsconsole 
 Uncaught NoMethodError: undefined method `Native' for main

also I have included these in my html head tag

<script src="app.js"></script>

keshav.b...@gmail.com

unread,
Jan 17, 2015, 7:38:29 AM1/17/15
to opa...@googlegroups.com, keshav.b...@gmail.com
Ohh sorry on the second line i forgot to put the $ sign, but in my script it exists. I still get the error
Reply all
Reply to author
Forward
0 new messages