Kevin Causey

Joined

1,840 Experience
17 Lessons Completed
0 Questions Solved

Activity

Posted in Setup MacOS 13 Ventura Discussion

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.

Posted in Rails 7 and postgres 15

Here's the deal: If you build a M2 machine with a timemachine backup of a non-Apple Silicon machine, your homebrew will be installed in the wrong place. All subsequent actions get foiled along the way.

Start over by scrubbing the existing Homebrew, then installing it into "/opt/homebrew"

You can then install postgresql@15 with homebrew. Update your path with:

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

then:

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

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

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

Hope this saves some time for someone...

Posted in Setup MacOS 13 Ventura Discussion

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

Posted in Setup MacOS 13 Ventura Discussion

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)?

Posted in Rails 7 and postgres 15

Okay, starting over.

I've ripped out rvm and old setups on this M2 Mac running 13.2.1
I've ripped out home-brew and reinstalled clean

ruby -v gives (which I believe is the default installed ruby):
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]

which ruby gives:
/usr/bin/ruby

"asdf plugin add ruby" and "asdf plugin add nodejs" appear to work correctly

"asdf install ruby 3.2.2" gives this:
To follow progress, use 'tail -f /var/folders/l1/xdqq3b4s3w1gwvf2mtr861nh0000gn/T/ruby-build.20230417203505.37998.log' or pass --verbose
Downloading openssl-3.1.0.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/aaa925ad9828745c4cad9d9efeb273deca820f2cdcf2c3ac7d7c1212b7c497b4
Installing openssl-3.1.0...
Installed openssl-3.1.0 to /Users/jiblethead/.asdf/installs/ruby/3.2.2

Downloading ruby-3.2.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
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.20230417203505.37998.ytrKZQ
Results logged to /var/folders/l1/xdqq3b4s3w1gwvf2mtr861nh0000gn/T/ruby-build.20230417203505.37998.log

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

thoughts? I'm getting tired of it, ready to get coding in Rails 7...

Posted in Rails 7 and postgres 15

I appear to have libpq 15.2 installed. I'm wondering if I have issues with rvm being installed still on this machine.

Any one have comments as to whether killing rvm is a good thing? I've been developing in Rails since 2.3.8, and have rvm managing versions across multiple projects. Because of this issue, I'm now maintaining an older machine with the intact rvm install (and multiple projects, from Rails 3 to Rails 5).

I want to start of with some Rails 7 stuff, so I have a new M2 machine, just can't see to get postgres happy.

Posted in Rails 7 and postgres 15

I continue to get errors with asdf loading ruby 3.3. Do I need to scrub off rvm completely? use an older version of ruby?

Posted in Setup MacOS 13 Ventura Discussion

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...

Posted in Rails 7 and postgres 15

okay, before anyone attempts to answer this, I just found the tutorial here about installing ruby and rails... will follow it.

P.S. I've been coding rails forever and have apps running in 3.x for 10+ years. Now I'm setting up a new M2 machine to do Rails 7 work. Funny how this configuration stuff gets set up and forgotten rather quickly...

Posted in Rails 7 and postgres 15

I've got Postgres15 installed via Homebrew, and it's running.
When I build a new Rails 7 app with: "rails new testapppg -d postgres" I can't get it to install pg (1.4.6)

I see errors like "Unable to find PostgreSQL client library.

I'm sure it's related to some type of path issue.

I can build a Rails 7 app with the default sqlite database and it works fine.

Thoughts on how to get Postgres15 configured so I can successfully get the pg gem installed?