I have installed a new rails project like so:
$ rails new site
and it executes and reaches:
bundle install
this worked for me: sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install rails
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install rails