From ff972a51a320097c7eae9b3783defafe38beb905 Mon Sep 17 00:00:00 2001 From: Kevin Cooper Date: Thu, 7 Nov 2024 17:52:16 -0500 Subject: [PATCH 1/4] simplify setup commands --- docs/development-setup.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/development-setup.md b/docs/development-setup.md index 104decd7a..107eacf4e 100644 --- a/docs/development-setup.md +++ b/docs/development-setup.md @@ -28,7 +28,6 @@ Note to install the software below we recommend the following package managers: - In this case, be sure to increase the default slab page size. This is done by passing `-I 16m` to the `memcached` command. - When using Homebrew via `brew install memcached; brew services start memcached`, slab size can be configured at `/usr/local/Cellar/memcached/1.x.x/homebrew.mxcl.memcached.plist` 1. PostgreSQL 10+ - - Create empty databases for use by the app: `createdb nemo_development && createdb nemo_test` 1. ImageMagick 6.7+ - ImageMagick is used to resize uploaded images. - It should be available through any of the package managers listed above. If not it can be built from source. @@ -115,11 +114,7 @@ git checkout develop 1. TODO: Make this happen automatically during the previous step, maybe with Yarn workspaces. 1. Run `cp config/database.yml.example config/database.yml`. 1. (Optional) Create a `.env.development.local` file and override any settings from `.env` as you see fit. Note that a valid Google Maps API key must be present for certain tests to pass. -1. Setup the UUID postgres extension: - 1. On Linux: `sudo -u postgres psql nemo_development -c 'CREATE EXTENSION "uuid-ossp"'` - 1. On Mac with Homebrew: `psql nemo_development -c 'CREATE EXTENSION "uuid-ossp"'` -1. Load the database schema: `bundle exec rake db:schema:load`. -1. Seed the database: `bundle exec rake db:seed`. +1. Load the database schema and seed the database: `bundle exec rake db:setup`. 1. Pre-process the theme SCSS files: `bundle exec rake theme:preprocess` 1. Create an admin account: `bundle exec rake db:create_admin`. You should receive a message like this: "Admin user created with username admin, password hTyWc9Q6" (The password is random, copy it and use on your first login). 1. Optionally, you can create some fake data to get things rolling by running `bundle exec rake db:create_fake_data`. From 0f6ddd751de69e87d9ac03d06512341099bde83d Mon Sep 17 00:00:00 2001 From: Kevin Cooper Date: Thu, 7 Nov 2024 18:09:26 -0500 Subject: [PATCH 2/4] upgrade hairtrigger to fix db:migrate --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 3ddc87690..1a170b670 100644 --- a/Gemfile +++ b/Gemfile @@ -94,7 +94,7 @@ gem "bootsnap", "~> 1.4", require: false gem "dalli", "~> 3.2" # DB -gem "hairtrigger", "~> 0.2.20" +gem "hairtrigger", "~> 1.2" gem "immigrant", "~> 0.3.1" # foreign key maintenance gem "pg", "~> 1.5" gem "pg_search", "~> 2.1" diff --git a/Gemfile.lock b/Gemfile.lock index f679ec5ca..dcf0bd33f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -296,8 +296,8 @@ GEM activerecord (>= 4.0.0) globalid (1.2.1) activesupport (>= 6.1) - hairtrigger (0.2.25) - activerecord (>= 5.0, < 8) + hairtrigger (1.2.0) + activerecord (>= 6.0, < 8) ruby2ruby (~> 2.4) ruby_parser (~> 3.10) hashdiff (1.1.1) @@ -718,7 +718,7 @@ DEPENDENCIES flatpickr font-awesome-rails (~> 4.7) friendly_id (~> 5.1) - hairtrigger (~> 0.2.20) + hairtrigger (~> 1.2) i18n-country-translations (~> 1.0) i18n-js (~> 3.0) image_processing (~> 1.12) From 0707cd5ac5730ccad8829fbd309f157a3ecc87ec Mon Sep 17 00:00:00 2001 From: Kevin Cooper Date: Thu, 7 Nov 2024 18:11:34 -0500 Subject: [PATCH 3/4] commit changes to schema.rb on migrate --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 8ef380fe6..39b54e84d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2023_11_29_192037) do +ActiveRecord::Schema[7.1].define(version: 2023_11_29_192037) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" From e1f63ceb26d38f1d9870dd446b8e296e65e76518 Mon Sep 17 00:00:00 2001 From: Kevin Cooper Date: Thu, 7 Nov 2024 20:34:47 -0500 Subject: [PATCH 4/4] remove pry which is interfering with basic irb initialization --- Gemfile | 5 ----- Gemfile.lock | 14 -------------- 2 files changed, 19 deletions(-) diff --git a/Gemfile b/Gemfile index 1a170b670..767ac6351 100644 --- a/Gemfile +++ b/Gemfile @@ -162,11 +162,6 @@ group :development, :test do gem "puma", "~> 6.4" gem "selenium-webdriver", "~> 4.15.0" # TODO: Can't upgrade to 4.17 until Rails 7 + Ruby 3.3 - # Debugging - gem "pry", "~> 0.13" - gem "pry-byebug", "~> 3.9" - gem "pry-rails", "~> 0.3" - # External request capture gem "vcr", "~> 6.0" gem "webmock", "~> 3.10" diff --git a/Gemfile.lock b/Gemfile.lock index dcf0bd33f..c526cd121 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -183,7 +183,6 @@ GEM bullet (7.2.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) - byebug (11.1.3) cancancan (3.6.1) capybara (3.40.0) addressable @@ -199,7 +198,6 @@ GEM chunky_png (1.4.0) climate_control (0.2.0) clipboard-rails (1.7.1) - coderay (1.1.3) coffee-rails (5.0.0) coffee-script (>= 2.2.0) railties (>= 5.2.0) @@ -353,7 +351,6 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - method_source (1.1.0) mime-types (3.6.0) logger mime-types-data (~> 3.2015) @@ -397,14 +394,6 @@ GEM activerecord (>= 5.1) csv pg (>= 0.17) - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.10.1) - byebug (~> 11.0) - pry (>= 0.13, < 0.15) - pry-rails (0.3.11) - pry (>= 0.13.0) psych (5.1.2) stringio public_suffix (6.0.1) @@ -738,9 +727,6 @@ DEPENDENCIES phony (~> 2.15) popper_js (~> 1.14) postgres-copy (~> 1.0) - pry (~> 0.13) - pry-byebug (~> 3.9) - pry-rails (~> 0.3) puma (~> 6.4) rack-attack (~> 6.3) rails (~> 7.1.0)