-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
foreman start in dev Unknown switches '-w' #956
Comments
I have the same problem. I've been starting my server without the |
@HeavenlyPeach If we remove |
@thanhnha1103 it all depends on if you're using the rails binstubs for rails/webpacker. If not, then you're using the real Webpack command. |
Thank @justin808, I just followed the tutorial above step by step, and get error: I still don't understand why. |
3.0.2 broke this... PR anybody? |
@thanhnha1103 Can you link me to an example repository? Because I'm having trouble reproducing your issue. See https://github.com/Judahmeek/ror-test for a working example. |
I just reproduced this and push code to new repository https://github.com/thanhnha1103/test-react-on-rails Thank you, |
@thanhnha1103 Please see if v10, just shipped, fixes the issue! |
@justin808 Thank you and Team for helping me. |
I ran into the same issue with latest versions of rails (5.1.4), react_on_rails (10.0.0) and bundler (1.16.0.pre.3). This is related to the way Bundler generates the binstubs. To get around this problem:
No more Hope this helps. |
@pguegan 's workaround resolved the error for me. Thanks! |
This is caused by Bundler 1.16.0 - I've raised an issue with them rubygems/bundler#6149. For some reason, 1.16.0 adds the following two lines to the top of all generated binstubs: This seems to prevent command line arguments being proxied to the underlying executable. I'm not sure why they're needed, because simply removing those lines fixes the behaviour. @justin808 Fyi, while webpacker did remove command line arguments in 3.0.2, it was only for the webpack dev server, the webpack runner still proxies arguments through. |
Ok a solution that works without downgrading Bundler is as follows:
This re-generates the binstubs without the 2 extra lines at the start which eat your command line arguments. |
@johnmcdowall, this changes my bin/webpack to: |
"For now, the fix is to run bundle binstubs bundler --force" This changes bin/bundler vs the webpack stuff and works for me now both locally and on Heroku |
I trying this React on Rails Basic Tutorial. But in the step "foreman start -f Procfile.dev" I got this error:
I using gem and have Procfile.dev like in the Tutorial:
#Gemfile
#Procfile.dev
The text was updated successfully, but these errors were encountered: