gem install rails
rails new template
rails db:system:change --to=postgresql
I've been testing things further with an alternative method of Homebrew installation. This will allow for packages to be installed to the arm64 instead of forcing them through Rosetta2. The benefit of this is that libraries like RVM and asdf will use Homebrew to install dependencies. Now, with the dependencies being installed for arm64 instead of Rosetta2, we can install and compile Ruby for arm.
If you're now having issues with brew installs, you can try to add the -s flag which will download from source even if a package is available.
brew install -s PROGRAM_NAME
If you're going to be using Ruby on Rails, there is an issue with the FFI library where you will need to pull from master. This is accurate for the 1.13.1 version of FFI. You can add this to the Gemfile
gem 'ffi', github: 'ffi/ffi'
gem 'ffi', git: 'https://github.com/ffi/ffi.git'
You'll need to install node from source.
brew install wget
tar zxf node-v15.3.0.tar.gz
sudo make install
sudo npm -g install yarn
The results are amazing. HOWEVER, I just cannot recommend this approach at this moment until things get ironed out. There are still too many issues and compatibility problems with the Ruby ARM Version. I've found a few crashes and it's just not stable enough. For now, continue to use the Ruby x86 version.