`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:

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

It could be that you need to update your version.

gem update bundler

That fixed it for me.