Notes on getting my M1 Rails + Foreman environment working
I expect this to evolve quickly and different things seem to be working for different people. In the meantime, hope to avoid a few rabbit holes for others.
-
rvmworked for ruby 3.0.0 but not 2.6.6 (which is what I needed). cflags workarounds made it so ruby could get installed but gems with native extensions like grpc could not compile correctly. Triedasdfbefore tryingrbenvand it worked, so I stuck withasdf. - Had to prepend every brew installation (including brew itself) with
arch -x86_64 brew install .... - After installing
asdf, I installedbundleras usual. Noarch -x86_64or anything. Same forbundle installafterwards. - This DriftingRuby episode helped a lot.
I don't think the following were necessary but this is what I did because installing things with brew was getting hairy:
- Use Postgres.app to keep PostgreSQL running in the background, deleted it from my Procfile. Naturally, I have to start Postgres manually before I start Foreman.
- Downloaded ElasticSearch binaries and put the path in my Procfile. Essentially
/Users/jose/dependencies/elasticsearch/elasticsearch-#.#.#/bin/elasticsearch
