How to Resolve "Your Bundle Only Supports Platforms ["X86-Mingw32"] But Your Local Platforms Are ["Ruby", "X86_64-Linux"]"

Bundler warning when running bundle - Ruby on Rails

Just remove this line from your Gemfile

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

because you obviously do not run your application on any of these platforms.

Then run bundle install again.

Platforms added to Gemfile.lock

After digging into this with fresh eyes in the morning here's what happened.

I checked my bash history and saw that I ran bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java before the commit I posted in the question. This obviously adds more platforms in your Gemfile.lock and subsequently platform specific dependencies.

I believe I ran this in the terminal to get rid of what I thought was an error around tzinfo-data. More info on that "error" here https://github.com/tzinfo/tzinfo-data/issues/12.

Rather than editing the Gemfile.lock directly, I ran bundle lock --remove-platform x86-mingw32 x86-mswin32 x64-mingw32 java and this made the appropriate edits to my lock file. More info here http://bundler.io/v1.16/bundle_lock.html.

Heroku no longer throwing an error when deploying as expected. Hope this helps someone in the future.



Related Topics



Leave a reply



Submit