These are chat archives for opal/opal

14th
Jan 2018
G. Gibson
@mistergibson
Jan 14 2018 19:53
@elia : Any thoughts thus far on what might be going on with this?
G. Gibson
@mistergibson
Jan 14 2018 21:15
Also: even though I do a Opal.eval("require 'date'"); DateTime is still undefined.
Ilya Bylich
@iliabylich
Jan 14 2018 23:33
@mistergibson --gem option is designed to be used with gems that are not compatible with opal
So by passing this option you include lib directory of the gem to the load path of the Opal
But this gem is designed to be used directly by Opal. It has all files in the opal directory (and the lib directory contains the code the pushes opal dir to the opal's load path)
If you really want to use opal executable you can write something like
$ opal -I../opal-browser/opal --gem paggio --compile your_code.rb
(if opal-browser is in ../opal-browser)
If you compile it from the ruby code (using opal's builders and compilers) you can simply write require 'opal-browser' before compiling the code to register all paths