railsdevs.com: `bin/setup` failed on fresh install

Describe the bug bin/setup failed on a fresh repo install.

To Reproduce Steps to reproduce the behavior:

  1. Git clone git@github.com:joemasilotti/railsdevs.com.git.
  2. Run brew bundle install --no-upgrade and wait for it to finish.
  3. Run bin/setup
  4. See error. Full Console output Gist here

Expected behavior The installation script should automatically get the application setup.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context On MacOS Monterey MacBook Pro (13-inch, 2020) 12.3.1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

@joemasilotti let me have a look.

Ah, that’s great to know! Thanks for digging in and following up.

Unfortunately we can’t set a minimum version in the Brewfile, so Brewfile.lock.json:272 will have to do for now!

That looks like your version of Postgres doesn’t support that syntax, but you’re running a version higher than me. (I’m on 14.2.) So I’m really not sure what’s going on here!

Maybe a red herring, but I just reran the migrations and the following diff was made to my schema. I wonder if this is related?

diff --git a/db/schema.rb b/db/schema.rb
index c42ca61..72ba1a0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -12,6 +12,7 @@

 ActiveRecord::Schema[7.0].define(version: 2022_05_01_021745) do
   # These are extensions that must be enabled in order to support this database
+  enable_extension "pg_stat_statements"
   enable_extension "plpgsql"

   create_table "active_storage_attachments", force: :cascade do |t|
@@ -227,7 +228,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_05_01_021745) do
     t.string "processor_id"
     t.boolean "default"
     t.jsonb "data"
-    t.datetime "deleted_at"
+    t.datetime "deleted_at", precision: nil
     t.datetime "created_at", null: false
     t.datetime "updated_at", null: false
     t.index ["owner_type", "owner_id", "deleted_at", "default"], name: "pay_customer_owner_index"
@@ -264,8 +265,8 @@ ActiveRecord::Schema[7.0].define(version: 2022_05_01_021745) do
     t.string "processor_plan", null: false
     t.integer "quantity", default: 1, null: false
     t.string "status", null: false
-    t.datetime "trial_ends_at"
-    t.datetime "ends_at"
+    t.datetime "trial_ends_at", precision: nil
+    t.datetime "ends_at", precision: nil
     t.decimal "application_fee_percent", precision: 8, scale: 2
     t.jsonb "metadata"
     t.jsonb "data"

FWIW I couldn’t reproduce the issue with a fresh, deleting the existing databases, and running bin/setup.

Thanks for debugging @themudassarhassan!