Reputation: 13
My Rails/React application is failing when I deploy to Heroku. This was not always the case; it only started happening after reinstalling Webpack locally (for a different project). The app still works fine on my local machine.
I've tried creating a new Heroku app to no avail, and tried reverting to a previous working commit, which also fails now for some reason. There's nothing in the changelog that looks like it would cause any problems except for maybe a change from webpacker (3.2.0)
to webpacker (3.3.1)
.
Here's the related part of the Heroku build log:
/tmp/build_f18e594f7966bd80b565c49de7015c56/zerovolts-kanjibenkyo-9786c55/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/rubygems_integration.rb:432:in `block in replace_bin_path': can't find executable webpack for gem webpacker (Gem::Exception)
from /tmp/build_f18e594f7966bd80b565c49de7015c56/zerovolts-kanjibenkyo-9786c55/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/rubygems_integration.rb:463:in `block in replace_bin_path'
from ./bin/webpack:21:in `<main>'
Full build log here.
Upvotes: 1
Views: 767
Reputation: 2694
can't find executable webpack for gem webpacker (Gem::Exception)
Basically, the executable bin/webpack
is missing.
The easiest way is to run rails new app --webpack
and go to the newly created app directory and go to app/bin
directory and copy those missing files into your own project.
let me know if this fixes your issue
Upvotes: 1