okay let's put a platform tag at the end of a gem in the gemfile, because it only works when you don't use the mingw platform on windows:

gem 'eventmachine', platform: :ruby

so far so good. Now lets remove the gemfile.lock and let bundle rebuild the dependency tree again (to make sure nothing gets left there):

bundle install

Resolving Dependencies.....
Fetching eventmachine 1.2.7 (x64-mingw32)

Why bundle, why?? :(

Now to fix that, i have to:
gem uninstall eventmachine
gem install eventmachine --platform=ruby

every fucking time.

  • 1
    Why? Does package management use a source of truth other than the config and the lock?
  • 0
    @homo-lorens seems like a part of the config is also stored in the lock file. That is, apart from the versions of the actual packages. So if you want to force the platform, you'll have to configure the lock aswell, even though it should definitely NOT hold that kind of stuff.

    In general you'd should not even force the platform at all, but some packages are broken in a away, that makes them simply unusable, and you have to fall back to the 'any' arch equivalent, which in this case is platform=ruby.

    And it makes it even better, that it then simply ignores the platform set in your ACTUAL config, which is the gemfile

    TL:DR: part of the config is stored in the lock file for no particular reason.
  • 0
    @thebiochemic Don't you have commands to change the lockfile then?
  • 1
    @homo-lorens i have
    bundle lock --add-platform=ruby

    which would add a platform to the lock, but not to the gemfile. Again, kinda not the right place, to config stuff like that.

    And then it would control the platform over ALL gems, and not only the ones, where i want to use a specific platform for.
Add Comment