Reading data from file and passing to javascript

ruby executes on the server side, which is the place on the internet
that is hosting your website. js executes on the client side, which
means in someone's browser. In other words, the two languages execute
at different times and miles apart. So you aren't going to be able to
pass ruby arrays to a js function.

···

--
Posted via http://www.ruby-forum.com/.