Closed gaurijo closed 1 year ago
I'm pretty sure the source of your gem problem is your x86 Homebrew installation. In particular there are several libraries installed via Homebrew which cause compilation problems for gems requiring native extensions. Why it eventually works, I don't know, but I also have an ARM Mac and, with ARM Homebrew packages, I can install all of the Book Tracker's gems without any problem.
This PR was worked on in a different MAC environment (on a separate computer), where Homebrew was installed for ARM:
When I run % file $(which psql)
on this machine it shows:
/opt/homebrew/opt/postgresql@16/bin/psql: Mach-O 64-bit executable arm64
But I was still getting gem-related errors when trying to install ruby 3.2.2
and again when trying to run bundle
and I'm not sure why 😕 Updating the gems this way was the only way I was able to get past the errors. (I also have rbenv
installed as my ruby version package manager if that's useful to know)
Is there any specific documentation you followed for your Homebrew installation on your ARM machine? I was using these resources, which felt pretty straight forward, but something must've been messed up along the way.
Official homebrew installation guide How to install homebrew on m1
Okay. It looks like Gemfile.lock
is the only file that changed, so why don't you remove the awscli-bundle stuff from this PR and then I'll merge it.
Correct me if I'm wrong, but one of your Macs has x86 Homebrew installed, and the other has ARM Homebrew, but they're both ARM Macs? For the first one, I don't know what the remedy is, but I assume it would involve something like uninstalling the x86 Homebrew and then installing the ARM one.
For me, I didn't do anything special, and I didn't even read the docs, I just ran the "Install Homebrew" command that's printed on the Homebrew main page.
I've just removed all the awscli-bundle stuff so this should be ready to merge now (all checks pass).
And that's correct - my personal mac is a M1 (ARM) machine but somehow had x86_64 Homebrew installed on it. My Library IT mac (the one I used for this PR) is a M2 machine and has ARM Homebrew installed on it.
Could you remove awscli-bundle.zip
too?
Good catch. Done
deployment issues
, I kept getting errors related to my architecture when trying to updatedependencies/connect to postgres
after installingruby version 3.2.2
and many gems needed to be updated to be compatible forarm64
(and a few needed to be installed)Library IT laptop
so I essentially set the app up in a new environmentaws cli
installed as stated in theaws docs/UofI BOX notes,
and instead ended up installing avirtual environment
and logging in toaws
through that virtual env like so:Then any time I need to log into aws, I run the
$ source awscli-env/bin/activate
.I verify it works by running:
Then I'm able to login normally to aws with
aws login
To get out of the virtual environment I run
deactivate
(The awscli-bundle directory ended up getting committed to this PR (sorry!))
I haven't tried to deploy to
demo
because I didn't want to merge the changes from this branch to demo until I got some eyes on these changes. I'm hoping if this can be successfully merged intodevelop/demo
I'll finally be able to deploy (with the correct gems/architecture updates in place now)