These are chat archives for opal/opal

22nd
Jun 2015
Mitch VanDuyn
@catmando
Jun 22 2015 03:42

Man why is this so hard for me? Everytime I try to use every/after I have trouble getting the right things included.
I have opal-browser included in my gemspec and gem file, but when I require it its not there, unless
I do this:
if RUBY_ENGINE == 'opal'
require 'browser/interval'
end
which will at least boot, but then I get this:

A file required by "reactive_record/cache" wasn't found.
can't find file: "browser/interval" in ["/Users/mitch/.rvm/gems/ruby-1.9.3-p194/bundler/gems/opal-3682db6f2b23/opal", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/bundler/gems/opal-3682db6f2b23/stdlib", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/bundler/gems/opal-3682db6f2b23/lib", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/gems/opal-activesupport-0.1.0/opal", "/Users/mitch/railsdev/opal-react/lib", "/Users/mitch/railsdev/opal-react/vendor", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/gems/opal-jquery-0.3.0/lib", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/gems/opal-rspec-0.4.2/opal", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/gems/opal-rspec-0.4.2/vendor_lib", "/Users/mitch/railsdev/reactive_record/lib", "/Users/mitch/railsdev/reactive_record/vendor", "/Users/mitch/railsdev/reactive_record/spec/dummy/app/assets/images", "/Users/mitch/railsdev/reactive_record/spec/dummy/app/assets/javascripts", "/Users/mitch/railsdev/reactive_record/spec/dummy/app/assets/stylesheets", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/gems/jquery-rails-3.1.2/vendor/assets/javascripts", "/Users/mitch/.rvm/gems/ruby-1.9.3-p194/gems/opal-rails-0.7.0/lib/assets/javascripts", "/Users/mitch/railsdev/react-rails/lib/assets/javascripts", "/Users/mitch/railsdev/react-rails/lib/assets/react-source", "/Users/mitch/railsdev/reactive_record/spec/dummy/app/models/shared", "/Users/mitch/railsdev/react-rails/lib/assets/react-source/development", "/Users/mitch/railsdev/react-rails/lib/assets/javascripts"]

I am thinking its because I want to run this code isomorphically? But I am not actually calling "every" on the server, just on the client side... any clues?

Mitch VanDuyn
@catmando
Jun 22 2015 03:50
For now I just copied both browser/interval and browser/delay into my directory... there must be a better way :-)
Elia Schito
@elia
Jun 22 2015 08:35
@ylluminate I keep a copy of the cdn repo in cdn/
and then basically follow the examples I added to the rake dist task description
rake dist
    Build *corelib* and *stdlib* to "build/"

    You can restrict the file list with the FILES env var (comma separated)
    and the destination dir with the DIR env var.

    Example: rake dist DIR=/tmp/foo FILES='opal.rb,base64.rb'
    Example: rake dist DIR=cdn/opal/0.8.0.rc1
    Example: rake dist DIR=cdn/opal/master
then go to the cdn repo and push (wihout commit access it would be a PR of course)
ylluminate
@ylluminate
Jun 22 2015 13:33
@elia right. I'm interested more in the workflow as it would seem prudent to have a cdnify option or support library for other opal wrapper projects as well to generate and deploy cdn drops efficiently on updates.
ylluminate
@ylluminate
Jun 22 2015 13:41
and how are the externals (https://github.com/opal/opal-cdn/tree/gh-pages/external) supposed to be added right now or is that a manual process sans a rake task?
Elia Schito
@elia
Jun 22 2015 13:43
@ylluminate it's manual, at a point I was pondering the removal of the cdn completely but I noticed it's useful to some people
@Mogztter ^^^
ylluminate
@ylluminate
Jun 22 2015 14:21
well the cdn approach is really useful at quickly introducing opal and doing things fast and dirty to get ppl moving and excited. we're going to be making an opal-phaser cdn to do just that for examples, etc.
nothing beats in browser examples
Elia Schito
@elia
Jun 22 2015 14:23
that's true, so, the idea is to add phaser to the external dir, right?
ylluminate
@ylluminate
Jun 22 2015 14:25
maybe. i'm not yet sure if we'll do that or make our own cdn. i was kind of thinking that it'd be nice to have a central repo for interesting wrappers, but it might be too inconvenient. BUT, as noted, i was thinking of making a tool to make quick work of making and updating cdns
Elia Schito
@elia
Jun 22 2015 14:28
I think it would be ok to give more ppl commit access to the cdn repo
ylluminate
@ylluminate
Jun 22 2015 14:30
that might not be a bad idea then to have a single umbrella
Jared White
@jaredcwhite
Jun 22 2015 16:48
@elia Anything I can do to help troubleshoot that require_tree bug? Is that actually an issue with the opal-rails gem, or the Sprockets stuff in the opal gem?
CJ Lazell
@cj
Jun 22 2015 17:04
morning, how would you mount a rack app to Opal::Server? I’m trying to allow https://github.com/opal/opal-rspec/blob/master/lib/opal/rspec/rake_task.rb#L18 to make ajax calls to an app
CJ Lazell
@cj
Jun 22 2015 18:00
also found a new bug when compiling opal/opal#959