Postgresql gem doesn't install properly in Ruby 3.0

I was trying Ruby 3.0 The postgresql gem pg couldn't be installed successfully If I was looking for an article, I could solve it, so just as a reminder.

I was able to solve it by referring to the issues below. Thanks! !! !! https://github.com/ged/ruby-pg/issues/365

The procedure I took is as follows.

$ ridk exec pacman -S mingw-w64-x86_64-postgresql
Resolving dependencies...
Checking for conflicting packages...

package(18) mingw-w64-x86_64-bzip2-1.0.8-2  mingw-w64-x86_64-ca-certificates-20200601-2
                mingw-w64-x86_64-libgcrypt-1.8.7-2  mingw-w64-x86_64-libgpg-error-1.41-3
                mingw-w64-x86_64-libsystre-1.0.1-4  mingw-w64-x86_64-libtasn1-4.16.0-1
                mingw-w64-x86_64-libtre-git-r128.6fb7206-2  mingw-w64-x86_64-libxml2-2.9.10-5
                mingw-w64-x86_64-libxslt-1.1.34-2  mingw-w64-x86_64-mpdecimal-2.5.0-1
                mingw-w64-x86_64-ncurses-6.2-2  mingw-w64-x86_64-openssl-1.1.1.i-1
                mingw-w64-x86_64-p11-kit-0.23.21-4  mingw-w64-x86_64-python-3.8.7-2
                mingw-w64-x86_64-tk-8.6.11-1  mingw-w64-x86_64-xz-5.2.5-2  winpty-0.4.3-1
                mingw-w64-x86_64-postgresql-12.4-1

Total download capacity:   37.77 MiB
Total installed capacity:  284.64 MiB

::Do you want to install it?[Y/n] y
::Get the package...
 mingw-w64-x86_64-xz-5.2....   354.3 KiB  1247 KiB/s 00:00 [###############################] 100%
 mingw-w64-x86_64-libxml2...  1507.1 KiB   594 KiB/s 00:03 [###############################] 100%
 mingw-w64-x86_64-libgpg-...   311.7 KiB   518 KiB/s 00:01 [###############################] 100%
 mingw-w64-x86_64-libgcry...   660.4 KiB   739 KiB/s 00:01 [###############################] 100%
 mingw-w64-x86_64-libxslt...   436.8 KiB   973 KiB/s 00:00 [###############################] 100%
 mingw-w64-x86_64-libtasn...   172.0 KiB   717 KiB/s 00:00 [###############################] 100%
 mingw-w64-x86_64-p11-kit...   333.7 KiB   261 KiB/s 00:01 [###############################] 100%
 mingw-w64-x86_64-ca-cert...   349.8 KiB   732 KiB/s 00:00 [###############################] 100%
 mingw-w64-x86_64-openssl...     4.8 MiB   651 KiB/s 00:07 [###############################] 100%
 mingw-w64-x86_64-bzip2-1...    89.1 KiB  66.7 KiB/s 00:01 [###############################] 100%
 mingw-w64-x86_64-mpdecim...   344.4 KiB   906 KiB/s 00:00 [###############################] 100%
 mingw-w64-x86_64-libtre-...    84.2 KiB   108 KiB/s 00:01 [###############################] 100%
 mingw-w64-x86_64-libsyst...    24.0 KiB  1042 KiB/s 00:00 [###############################] 100%
 mingw-w64-x86_64-ncurses...  1578.1 KiB  1779 KiB/s 00:01 [###############################] 100%
 mingw-w64-x86_64-tk-8.6....  1973.1 KiB   289 KiB/s 00:07 [###############################] 100%
 mingw-w64-x86_64-python-...    17.0 MiB  3.87 MiB/s 00:04 [###############################] 100%
 mingw-w64-x86_64-postgre...     7.5 MiB   437 KiB/s 00:18 [###############################] 100%
 winpty-0.4.3-1-x86_64         500.5 KiB   819 KiB/s 00:01 [###############################] 100%
(18/18)Check the key of the key ring[###############################] 100%
(18/18)Check package integrity[###############################] 100%
(18/18)Loading package files[###############################] 100%
(18/18)Check for file conflicts[###############################] 100%
(18/18)Check free space[###############################] 100%
::Processing package changes...
( 1/18)Install mingw-w64-x86_64-xz                   [###############################] 100%
( 2/18)Install mingw-w64-x86_64-libxml2              [###############################] 100%
( 3/18)Install mingw-w64-x86_64-libgpg-error         [###############################] 100%
( 4/18)Install mingw-w64-x86_64-libgcrypt            [###############################] 100%
( 5/18)Install mingw-w64-x86_64-libxslt              [###############################] 100%
( 6/18)Install mingw-w64-x86_64-libtasn1             [###############################] 100%
( 7/18)Install mingw-w64-x86_64-p11-kit              [###############################] 100%
( 8/18)Install mingw-w64-x86_64-ca-certificates      [###############################] 100%
( 9/18)Install mingw-w64-x86_64-openssl              [###############################] 100%
(10/18)Install mingw-w64-x86_64-bzip2                [###############################] 100%
(11/18)Install mingw-w64-x86_64-mpdecimal            [###############################] 100%
(12/18)Install mingw-w64-x86_64-libtre-git           [###############################] 100%
(13/18)Install mingw-w64-x86_64-libsystre            [###############################] 100%
(14/18)Install mingw-w64-x86_64-ncurses              [###############################] 100%
(15/18)Install mingw-w64-x86_64-tk                   [###############################] 100%
(16/18)Install mingw-w64-x86_64-python               [###############################] 100%
(17/18)Install winpty[###############################] 100%
(18/18)Install mingw-w64-x86_64-postgresql           [###############################] 100%

$ gem install pg
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
Successfully installed pg-1.2.3
Parsing documentation for pg-1.2.3
Done installing documentation for pg after 0 seconds
1 gem installed

$ rails generate migration TestMigration
      invoke  active_record
      create    db/migrate/20210120095052_test_migration.rb

Recommended Posts

Postgresql gem doesn't install properly in Ruby 3.0
How to install Bootstrap in Ruby
Install gem in Serverless Framework and AWS Lambda with Ruby environment
Install ruby serial port in WSL environment
Class in Ruby
Heavy in Ruby! ??
[Ruby on Rails] How to install Bootstrap in Rails
Ruby and Gem
Handling of date and time in Ruby. Use Date and Time properly.
Install Ruby 3.0.0 with asdf
About eval in Ruby
Install Ruby on Ubuntu 20.04
Output triangle in Ruby
Use PostgreSQL in Scala
Variable type in ruby
Install PostgreSQL 13 on CentOS 7.5
Fast popcount in Ruby
I searched for a web framework with Gem in Ruby