Ruby on Silicon
Setting up M1 MBP today (Hurray!)
But I'm having issues with Ruby installation. I'm using chruby and ruby-install.
TextMate and Rails is having trouble.
I think I `brew install automake bison openssl readline libyaml gdbm libffi`, `brew install automake bison openssl readline libyaml gdbm libffi`, `brew install ruby-install`, `ruby-install ruby`, `sudo gem install rails` (because wouldn't go without sudo). But now `gem install pg` fails
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /Users/gscar/.gem/ruby/3.0.2/gems/pg-1.2.3/ext
/Users/gscar/.rubies/ruby-3.0.2/bin/ruby -I /Users/gscar/.rubies/ruby-3.0.2/lib/ruby/3.0.0 -r ./siteconf20211029-6743-ntd38g.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
I have a folder at root level named src which contains a folder ruby-3.0.2 and file ruby-3.0.2.tar.xz. Was this created as part of the ruby install. Also ~/.rubies/ruby-3.0.2/bin/ruby. Lots of other files and folders in ~/.rubies/ruby-3.0.2.
Why does `gem install pg` fail?
I also have a Ruby script that I can run from the command line, but not TextMate.
I'm using the same .zshrc as worked on my 2103 MBP.
Thanks for any ideas. I assume it's a path problem of some sort.
MacBook Pro 16″, macOS 12.0