Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Foreman won't start #98

Closed
Rex-am-I opened this issue Nov 30, 2019 · 7 comments
Closed

Foreman won't start #98

Rex-am-I opened this issue Nov 30, 2019 · 7 comments
Labels

Comments

@Rex-am-I
Copy link

After what I think is a successful install (generation?), I am unable to get "Foreman start" working. The rails server command works, though. The Procfile has these two lines:
web: rails server
worker: sidekiq

The Procfile.dev has the following:
web: bundle exec rails server
worker: bundle exec sidekiq
webpack: bundle exec bin/webpack-dev-server

Can anyone please shed some light on this? Here's the error message:

05:02:39 web.1 | started with pid 228
05:02:39 worker.1 | started with pid 6304
05:02:39 webpack.1 | started with pid 6148
05:02:41 webpack.1 | bundler: not executable: bin/webpack-dev-server
05:02:41 webpack.1 | exited with code 126
05:02:41 system | sending SIGKILL to all processes
05:02:41 system | sending SIGKILL to web.1 at pid 228
05:02:41 system | sending SIGKILL to worker.1 at pid 6304
05:02:41 web.1 | exited with code 0
05:02:42 worker.1 | exited with code 0

@afomera
Copy link
Collaborator

afomera commented Nov 30, 2019

It looks like bin/webpack-dev-server can't boot. I'd try running that script first before trying to boot it up with Foreman and fixing that problem. Looks like it says it's not executable, so you may have to look up how to change that for your OS.

@excid3
Copy link
Owner

excid3 commented Nov 30, 2019

Try setting the file as executable chmod +x bin/webpack-dev-server

Something may have removed the executable bit, because I definitely know it's set by default since I've never run into that before.

@weefunker
Copy link

foreman start throwing webpack error on fresh install

module.js:549
throw err;
^

Error: Cannot find module 'webpack'

bin/webpack-dev-server gives same result

tried @excid3 suggestions and a lot of others including but not limited to upgrading yarn, rails install webpacker and removing node modules and npm install

yikes

@excid3
Copy link
Owner

excid3 commented Dec 11, 2019

@weefunker Sounds like a separate issue, not related to this one.

You should try running bin/yarn and making sure webpack is in your package.json. rails/webpacker#217 (comment)

@EduardoGHdez
Copy link

EduardoGHdez commented Dec 29, 2019

You should ensure that you have @rails/webpacker in your package.json

@Rex-am-I
Copy link
Author

Sorry for the long absence, I got busy with some pressing things. I recently returned to this issue and I may have found a solution that works - at least for now. I realized that I couldn't the line .bin/webpack-dev-server to run on Windows, and I tried a new tack by editing that line in Procfile.dev like so ruby bin/webpack-dev-server instead. Et voila! It works like a charm.

@excid3
Copy link
Owner

excid3 commented Feb 24, 2020

Awesome. Hope this helps anyone else that runs into trouble with it.

@excid3 excid3 closed this as completed Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants