`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:
It could be that you need to update your version.
That fixed it for me.