`x64_mingw` Is Not a Valid Platform

This is an annoying error, which I experienced while trying to set up a project in the beta Rails 5 (api mode). If you experience it, try seeing what bundler version you have:

1
2
$ bundle --version
#=> outputs something like 1.7.7

It could be that you need to update your version.

1
gem update bundler

That fixed it for me.