Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup MacOS 13 Ventura Discussion

Chris Oliver asked in General

To install rbenv you also need brew install openssl@1.1 readline libyaml gmp or brew install openssl@3 readline libyaml gmp. https://github.com/rbenv/ruby-build/wiki#suggested-build-environment

Reply

So everything worked well until I tried to change the headers for C:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

The error was:
the package path specified was invalid: '/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'

I am trying to set-up with the Apple M2 if that makes a difference??

Any help would be appreciated

Reply

That is just for Mojave version ... I believe that you are not in macOS 10.14

Reply

New M2 Pro needed 'brew install libyaml' after receiving rbenv install error about 'psych' gem.

Reply

Can confirm this fixed for me as well with M1 Pro.

Reply

yep, this happens on my M1 Pro too. But, you may check the log and it mentioned libyaml on the end of the content.

Reply

confirmed same on M2 MacBook Air 15 when installing asdf

Reply

Everytime I launch terminal on my M2 Pro. I see this
/Users/username/.asdf/completions/asdf.bash:89: command not found: complete
Anyone run into this?

Reply

As an aside, I just removed that line from the zshrc file and all seems to be going swell. Hope this helps someone else.

Reply

confirmed same worked for me

Reply

when I get to asdf install ruby 3.2.2... I bomb out here:

Installing ruby-3.2.2...
ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew

BUILD FAILED (macOS 13.2.1 using ruby-build 20230330)

Inspect or clean up the working tree at /var/folders/l1/xdqq3b4s3w1gwvf2mtr861nh0000gn/T/ruby-build.20230411161603.93328.IHeg1r
Results logged to /var/folders/l1/xdqq3b4s3w1gwvf2mtr861nh0000gn/T/ruby-build.20230411161603.93328.log

Last 10 log lines:
compiling ossl_x509ext.c
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
linking shared-object socket.bundle
linking shared-object openssl.bundle
1 warning generated.
linking shared-object ripper.bundle
make: *** [build-ext] Error 2

really clueless as to why this isn't working...

Reply

Okay, so I discovered that when I built this M2 machine using a timemachine backup of an intel machine, I had home-brew installed in a directory that's no longer allowed (who knew?)

I scrubbed off home-brew, reinstalled, and I'm able to reliably get ruby 3.2.2 installed using the steps in this tutorial.

I can build "rails new testapp" and get everything running, but I really want to be in postgres.

I've installed postgres@15 (using the app, although I also installed an removed using homebrew).

When I try "rails new testapp -d postgresql" I can't get the gem pg to build. I've tried a few options, pointing it to the correct pgconfig file, etc.

I feel like this is a problem due to the M2 chip machine specifically, like the pg gem is looking for stuff where it's not.

Has anyone been able to install the pg gem on a M2 mac running Ventura (13.2.1)?

Reply

I wanted to add this comment as I was able to resolve my issues.

export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"

then:

gem install pg -- --with-pg-config=/opt/homebrew/opt/postgresql@15/bin/pg_config

allowed me to get postgresql@15 running locally, and the pg gem installed.

then the usual steps to create a new app, designating the database "-d postgresql"

running "rake db:create" and "rails server" and I had a clean Rails 7.0.4.3 app using Ruby 3.2.2 on an M2 Mac running Ventura 13.2.1

Reply

I ran into this issue and had to do "brew install libyaml" first and then ruby installed. M2 MacBook Air 15

Reply

i fixed this same issue with RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/homebrew/opt/openssl@3.1" asdf install ruby latest after getting homebrew fixed up

Reply

Any reason why you don't install asdf via homebrew directly?

Reply

well, I didn't really think about asdf as I was an rvm guy for 10+ years.

The main problem I ran into was Apple changing what could be in a directory. I ended up clean installing Rails and asdf to work on a Rails 7+ project on a new laptop.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,038+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.