Postgresql With Rails

1 · · Aug. 9, 2022, 8:31 a.m.
As usual, this is just a diary of what problems being encountered during the process. Using Trigram in pg_search gem. As mentioned, we need a pg_trgm in pg_search gem. The problem is with this article, which misled me to enable the extension in the same gem. **Ultimately, make another migration that specifically create this extension. rails generate migration AddPgTrgmExtensionToDB class AddPgTrgmExtensionToDb < ActiveRecord::Migration[7.0] def change enable_extension :pg_trgm end end ...