usabilityhub / rails-erb-loader

Embedded Ruby (.erb) webpack loader for Ruby projects.
MIT License
103 stars 28 forks source link

Module build fails in staging/production #49

Closed brentdodell closed 6 years ago

brentdodell commented 7 years ago

Everything works fine in development, but I get the following in our staging environment:

Uncaught Error: Module build failed: Error: Command failed: bin/rails runner .../releases/20170922142412/node_modules/rails-erb-loader/erb_transformer.rb __RAILS_ERB_LOADER_DELIMETER__ erb 0
/usr/bin/env: ruby-local-exec: No such file or directory

    at ChildProcess.exithandler (child_process.js:204:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:891:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:497:12)

    at ChildProcess.exithandler (child_process.js:204:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:891:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:497:12)
    at Object.<anonymous> (http://.../MyAccount-5b440d9d1643ac9b3293.js:1:350142)
    at t (http://.../MyAccount-5b440d9d1643ac9b3293.js:1:101)
    at Object.<anonymous> (http://.../MyAccount-5b440d9d1643ac9b3293.js:1:328928)
    at t (http://.../MyAccount-5b440d9d1643ac9b3293.js:1:101)
    at http://.../MyAccount-5b440d9d1643ac9b3293.js:1:458
    at http://.../MyAccount-5b440d9d1643ac9b3293.js:1:469
rhys-vdw commented 7 years ago

Looks like your ruby-local-exec is not in your $PATH on your staging environment. Looks like this is an old deprecated feature of rbenv. I don't know more about it, but it doesn't sound like an issue with rails-erb-loader specifically.

rhys-vdw commented 6 years ago

Closing for stated reasons, let me know if I misunderstood the situation.