Skip to content
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

wdm install advice on Windows could be improved #451

Closed
belluzj opened this issue Aug 9, 2018 · 1 comment · Fixed by #523
Closed

wdm install advice on Windows could be improved #451

belluzj opened this issue Aug 9, 2018 · 1 comment · Fixed by #523
Labels

Comments

@belluzj
Copy link

belluzj commented Aug 9, 2018

I'm working on a Rails app and developing on Windows. I got advice to add wdm to my Gemfile and did as instructed, but this resulted later in a problem when deploying the same Rails app on a Linux machine, where bundler complained:

You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

If this is a development machine, remove the /usr/src/app/Gemfile freeze 
by running `bundle config --delete frozen`.

You have deleted from the Gemfile:
* wdm (>= 0.1.0)

I fixed the issue by changing my Gemfile:

-gem 'wdm', '>= 0.1.0' if Gem.win_platform?
+gem 'wdm', '>= 0.1.0', platforms: [:x64_mingw]

From what I understand, that way bundler knows that the gem is only needed on windows and can be smart about it. Maybe you could update the advice message that you display? However the platform symbol (:x64_mingw) may be different for each Ruby-on-Windows install.

@FrankFang
Copy link

FrankFang commented Apr 28, 2019

Thanks! It helps.
My config:

  gem 'wdm', '>= 0.1.0', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

ColinDKelley added a commit to Invoca/listen that referenced this issue Dec 1, 2020
ColinDKelley added a commit that referenced this issue Dec 2, 2020
amaiorano added a commit to amaiorano/amaiorano.github.io that referenced this issue Dec 29, 2023
As per guard/listen#451

Note that I get this message when serving now:

  Please add the following to your Gemfile to avoid polling for changes:
    gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants