From 586431521c15322e71183e9ddaab6554e87fee1a Mon Sep 17 00:00:00 2001 From: Dylan Jones Date: Wed, 3 Jan 2024 01:01:27 +0000 Subject: [PATCH 1/2] Upgrade to ruby 3.3 --- BUILD.md | 8 ++++---- Gemfile | 2 +- bin/deploy | 1 + config/server/unicorn | 8 ++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/BUILD.md b/BUILD.md index 69d3553..ab0b297 100644 --- a/BUILD.md +++ b/BUILD.md @@ -8,8 +8,8 @@ brew install mysql - Setup Ruby and Rails ``` bash -rvm install 3.2.2 -rvm use 3.2.2 --default +rvm install ruby-3.3.0 --reconfigure --enable-yjit --with-openssl-dir=$(brew --prefix openssl@1.1) +rvm use 3.3.0 --default bundle install ``` @@ -59,8 +59,8 @@ ssh-keygen -t rsa -C "your_email@example.com" rm -rf /home/rails git clone git@github.com:dylan8902/website.git /home/rails cd /home/rails -rvm install 3.2.2 -rvm use 3.2.2 --default +rvm install 3.3.0 +rvm use 3.3.0 --default bundle install ``` diff --git a/Gemfile b/Gemfile index 2cc72aa..652eb5f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '3.2.2' +ruby '3.3.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '>= 7.0.1', '< 7.1' diff --git a/bin/deploy b/bin/deploy index 1ac775d..48813b4 100755 --- a/bin/deploy +++ b/bin/deploy @@ -4,6 +4,7 @@ source ~/.bashrc source ~/.bash_profile cd /home/rails git pull +bundle install rake db:migrate RAILS_ENV=production export NODE_OPTIONS=--openssl-legacy-provider yarn install diff --git a/config/server/unicorn b/config/server/unicorn index 388977b..5f08502 100644 --- a/config/server/unicorn +++ b/config/server/unicorn @@ -16,7 +16,7 @@ CONFIG_RB=/home/unicorn/unicorn.conf PID=/home/unicorn/pids/unicorn.pid UNICORN_OPTS="-D -c $CONFIG_RB -E production" -PATH=/usr/local/rvm/rubies/ruby-3.2.2/bin:/usr/local/rvm/gems/ruby-3.2.2/bin:/home/unicorn/.rvm/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:$ -export GEM_HOME=/usr/local/rvm/gems/ruby-3.2.2 -export GEM_PATH=/usr/local/rvm/gems/ruby-3.2.2:/usr/local/rvm/gems/ruby-3.2.2:/usr/local/rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.2 -DAEMON=/usr/local/rvm/gems/ruby-3.2.2/bin/unicorn +PATH=/usr/local/rvm/rubies/ruby-3.3.0/bin:/usr/local/rvm/gems/ruby-3.3.0/bin:/home/unicorn/.rvm/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:$ +export GEM_HOME=/usr/local/rvm/gems/ruby-3.3.0 +export GEM_PATH=/usr/local/rvm/gems/ruby-3.3.0:/usr/local/rvm/gems/ruby-3.3.0:/usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0 +DAEMON=/usr/local/rvm/gems/ruby-3.3.0/bin/unicorn From a47cea791785f046a2b77f1d52400b922f028e45 Mon Sep 17 00:00:00 2001 From: Dylan Jones Date: Wed, 3 Jan 2024 01:03:42 +0000 Subject: [PATCH 2/2] bump ruby --- .github/workflows/security.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index b52aa93..6797996 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -11,7 +11,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2.2' + ruby-version: '3.3.0' bundler-cache: true - name: Run security tests run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a0248e..4cd6517 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2.2' + ruby-version: '3.3.0' bundler-cache: true - name: Create database run: |