Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Harry Moreno
    @morenoh149
    waves
    Cymen Vig
    @cymen
    hey! good to see you — I wish I hadn’t missed your ruby meetup presentation
    how did it go?
    Harry Moreno
    @morenoh149
    it was meh. Got the impression the rails ppl don't want to move away from http://rails-assets.org/
    also didn't know how to explain where bower would fit. But I asked for help :)
    Cymen Vig
    @cymen
    Yeah… I think browserify-rails is a good stepping stone to get to CommonJS (along with using npm modules). But then it makes sense to probably go away from the Rails asset pipeline and use browserify/webpack/… directly.
    But sometimes the Rails community seems a little backwards on JavaScript — or maybe more accurately it is highly variable (some using modern approaches, some not).
    Adrian Chen
    @ChennyBaBy
    Anyone got tips for encountering 'ReferenceError: require is not defined'. I'm pretty new to rails. was wondering if this is an common error.
    Cymen Vig
    @cymen
    @adrianchen19888 where are you getting that error? in the JS you attempt to load? or when you try to load the page, in your browser? or server-side in a log/console?
    Andrew Zures
    @AndrewZures
    hey! browserify-rails seems really cool. I'm just running into issues with getting it to work with a jasmine spec runner and I was wondering if you guys knew of any successful strategies. I've tried teaspoon and I've seen the custom boot loader. I've also tried jasmine-rails although I would prefer not to use it. Could also maybe see a standalone runner as a solution. I would need the strategy to work with the rails asset pipeline. I'd love for an easy solution but any help on a general strategy would be greatly appreciated. And letting me know that I haven't tinkered around with one of the solutions already out there is totally cool. p.s. hey Cymen, this is Andrew from 8th Light. Hope things are going great in SF.
    Andrew Zures
    @AndrewZures
    I think I figured it out, at least with jasmine-rails. thanks for making this library!
    Harry Moreno
    @morenoh149
    @AndrewZures cool
    Ciarán Archer
    @ciaranarcher
    Hi everyone - is it desirable/possible to have browserify-rails be disabled in production?
    Harry Moreno
    @morenoh149
    @ciaranarcher but then how do you bundle?
    in production browserify-rails should only be run once to compile the bundle. this bundle should then be cached as it shouldn't change
    Ciarán Archer
    @ciaranarcher
    @morenoh149 is it possible to precompile? And then deploy the compiled bundle with rails as a static asset?
    Harry Moreno
    @morenoh149
    @ciaranarcher the compilation is usually run on the deployed machine due to environment differences. But it shouldn't be a big deal as it's only done once.
    Joshua Sierles
    @jsierles
    greetings
    following the README, I'm trying to require a file but 'require' is not defiend
    Joshua Sierles
    @jsierles
    seems like the issue is that browserify 0.0.1 is what's available in rubygems
    Gregorio Setti
    @desmondhume
    Hi, i'm desperately trying to make es6 compilation work
    i don't know why, but it keeps telling
    ActionView::Template::Error (Error: Parse Error: Line 2: Illegal import declaration
      (in app/assets/javascripts/components/simple_map.js.jsx)):
    I've tried with es6ify too
    but it didn't work
    any idea/suggestion?
    Gregorio Setti
    @desmondhume
    Hi guys, is anybody experiencing this? facebook/react#3320
    I'm having hard time trying to make react components work with browserify rails
    the weird thing is that if I include those components with sprockets it works
    as soon as I compile them with browserify, it throws errors
    Harry Moreno
    @morenoh149
    @desmondhume have you looked into https://github.com/TannerRogalsky/sprockets-es6 ?
    but yeah if you add the babel browserify transform https://github.com/babel/babelify that could work
    Cymen Vig
    @cymen
    @desmondhume are the components using es6 as in import and such? Right now, browserify-rails is not detecting ES6 -- it detects based on the presence of require and module.exports -- you can force it to always browserify your JavaScript though so you could try that too.
    oh, if it is jsx, hrm... are you using reactify?
    Gregorio Setti
    @desmondhume
    @cymen @morenoh149 thank you guys
    everything's working fine with
    [babelify --stage 0] argument
    in the browserify rails config
    it works also with some es7 featues, super!
    Gregorio Setti
    @desmondhume
    Hi everybody! I just noticed these two lines in my rails logs
    Browserify: /Users/macbookair/Sites/dude-buddy/node_modules/.bin/browserifyinc -t [babelify --stage 0] --extension=".jsx" --list --cachefile=\"/Users/macbookair/Sites/dude-buddy/tmp/cache/browserify-rails/browserifyinc-cache.json\" -o "/Users/macbookair/Sites/dude-buddy/tmp/cache/browserify-rails/output20150623-8917-3wlawr" -
    Browserify: /Users/macbookair/Sites/dude-buddy/node_modules/.bin/browserifyinc -t [babelify --stage 0] --extension=".jsx" --cachefile=\"/Users/macbookair/Sites/dude-buddy/tmp/cache/browserify-rails/browserifyinc-cache.json\" -o "/Users/macbookair/Sites/dude-buddy/tmp/cache/browserify-rails/output20150623-8917-5nqdxw" -