Missing modules with Sprockets?
jweissman opened this issue · 2 comments
I'm having a lot of trouble with Firehose.io and the asset pipeline. Everything seems to go smoothly when config.assets.debug
is true, but when I set to false and Sprockets attempts to concatenate everything together, for some reason certain modules don't seem to be getting loaded.
In particular, Firehose.Consumer
is missing! Here's what the window.Firehose
object looks like at the console in this context:
Object {version: "1.1.0", codeName: "Rockin' Reconnect", Transport: function, LongPoll: function}
LongPoll: function LongPoll(args) {
Transport: function Transport(config) {
codeName: "Rockin' Reconnect"
version: "1.1.0"
__proto__: Object
I'm wondering if I'm just missing something here. I'm just including of the Firehose manifest at the end of my own Sprockets manifest with //= require firehose
. Note I'm definitely seeing the Firehose.Consumer
module in the concatenated Javascript -- I'm wondering if there's something different with how the WebSocket
and Consumer
modules reference/declare themselves?
I think I might have figured it out. I'm getting a stray exception in LongPoll
around a missing reference (something about the MSIE browser check.) I think I will plan to fork and see if I might be able to workaround to see if that resolves it...
Have worked it out in a fork and put a pull request together here: https://github.com/polleverywhere/firehose/pull/27