diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 723347c6cc..35faa0b7d5 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -3,9 +3,9 @@ RUBY_VERSION="$(cat .ruby-version | tr -d '\n')" # copy the file only if it doesn't already exist cp -n .devcontainer/.env.codespaces .env -# If the project's required ruby version changes from 3.3.10, this command +# If the project's required ruby version changes from 4.0.2, this command # will download and compile the correct version, but it will take a long time. -if [ "$RUBY_VERSION" != "3.3.10" ]; then +if [ "$RUBY_VERSION" != "4.0.2" ]; then rvm install $RUBY_VERSION rvm use $RUBY_VERSION echo "Ruby $RUBY_VERSION installed" diff --git a/.ruby-version b/.ruby-version index 5f6fc5edc2..4d54daddb6 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.10 +4.0.2 diff --git a/.tool-versions b/.tool-versions index c8799e1dc1..2b58a4f8e5 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -ruby 3.3.10 +ruby 4.0.2 nodejs 24.13.0 diff --git a/Dockerfile b/Dockerfile index 228419622c..559a4cebbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG ROOT=/usr/src/app/ FROM node:24-alpine AS node-source -FROM ruby:3.3.10-alpine AS build +FROM ruby:4.0.2-alpine AS build ARG ROOT WORKDIR $ROOT @@ -20,7 +20,7 @@ FROM ruby:3.3.10-alpine AS build COPY Gemfile* $ROOT RUN bundle install -FROM ruby:3.3.10-alpine +FROM ruby:4.0.2-alpine ARG ROOT WORKDIR $ROOT diff --git a/Gemfile b/Gemfile index 0a02501b3e..e75efcc7af 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -ruby "3.3.10" +ruby "4.0.2" gem "rails", "~> 7.2" gem "after_party" # Post-deployment tasks diff --git a/Gemfile.lock b/Gemfile.lock index e09dbd501b..9dca551e17 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -236,7 +236,7 @@ GEM faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - faraday-retry (1.0.3) + faraday-retry (1.0.4) faraday_middleware (1.2.1) faraday (~> 1.0) ffi (1.17.2) @@ -802,7 +802,7 @@ DEPENDENCIES wicked RUBY VERSION - ruby 3.3.10p183 + ruby 4.0.2 BUNDLED WITH - 2.6.6 + 4.0.9 diff --git a/README.md b/README.md index c1ef6205dc..14c66e556a 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ The complete [role description of a CASA volunteer](https://pgcasa.org/volunteer **Ruby** 1. Install a ruby version manager: [rvm](https://rvm.io/) or [rbenv](https://github.com/rbenv/rbenv) -1. when you cd into the project directory, let your version manager install the ruby version in `.ruby-version`. Right now that's Ruby 3.3.10 +1. when you cd into the project directory, let your version manager install the ruby version in `.ruby-version`. Right now that's Ruby 4.0.2 1. `gem install bundler` **node.js** diff --git a/app/services/case_contacts_contact_dates.rb b/app/services/case_contacts_contact_dates.rb index d9304f92dd..372fc68110 100644 --- a/app/services/case_contacts_contact_dates.rb +++ b/app/services/case_contacts_contact_dates.rb @@ -34,6 +34,6 @@ def chron_sort(case_contacts) end def order_and_format(case_contacts) - case_contacts.then { chron_sort _1 }.then { format_dates _1 } + case_contacts.then { chron_sort it }.then { format_dates it } end end diff --git a/doc/LINUX_SETUP.md b/doc/LINUX_SETUP.md index fd7c1e3ac8..f34ca0df2c 100644 --- a/doc/LINUX_SETUP.md +++ b/doc/LINUX_SETUP.md @@ -84,7 +84,7 @@ git clone https://github.com/rbenv/rbenv.git ~/.rbenv # fetch list of ruby versions git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build -rbenv install 3.3.10 +rbenv install 4.0.2 ``` If you would like RVM instead of rbenv @@ -95,9 +95,9 @@ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703 \curl -sSL https://get.rvm.io | bash . ./.bashrc rvm get head -rvm install 3.3.10 -rvm alias create ruby 3.3.10 -rvm alias create default ruby-3.3.10 +rvm install 4.0.2 +rvm alias create ruby 4.0.2 +rvm alias create default ruby-4.0.2 ``` ```# Download the Chrome browser (for RSpec testing): diff --git a/doc/MAC_SETUP.md b/doc/MAC_SETUP.md index 20007e0a19..2cd5df298e 100644 --- a/doc/MAC_SETUP.md +++ b/doc/MAC_SETUP.md @@ -56,17 +56,17 @@ Next, install the version of Ruby that this project uses. This can be found by c To install the appropriate ruby version, run: ```bash -rbenv install 3.3.10 +rbenv install 4.0.2 ``` -(Do not forget to switch 3.3.10 to the appropriate version) +(Do not forget to switch 4.0.2 to the appropriate version) Finally, run: ```bash -rbenv local 3.3.10 +rbenv local 4.0.2 ``` -(Do not forget to swtich 3.3.10 to the appropriate version) +(Do not forget to switch 4.0.2 to the appropriate version) ## Nodejs diff --git a/doc/WSL_SETUP.md b/doc/WSL_SETUP.md index e6e0436f09..08000015f9 100644 --- a/doc/WSL_SETUP.md +++ b/doc/WSL_SETUP.md @@ -28,7 +28,7 @@ You will need the following local tools installed: Install a ruby version manager like [rbenv](https://github.com/rbenv/rbenv#installation) - **Be sure to install the ruby version in `.ruby-version`. Right now that's Ruby 3.3.10.** + **Be sure to install the ruby version in `.ruby-version`. Right now that's Ruby 4.0.2.** Instructions for rbenv: @@ -48,13 +48,13 @@ Instructions for rbenv: 5. **[Install Ruby](https://github.com/rbenv/rbenv#installing-ruby-versions)** - **Be sure to install the ruby version in `.ruby-version`. Right now that's Ruby 3.3.10.** + **Be sure to install the ruby version in `.ruby-version`. Right now that's Ruby 4.0.2.** - `rbenv install 3.3.10` + `rbenv install 4.0.2` 6. **Set a Ruby version to finish installation and start** - `rbenv global 3.3.10` OR `rbenv local 3.3.10` + `rbenv global 4.0.2` OR `rbenv local 4.0.2` #### Troubleshooting If you are on Ubuntu in Windows Subsystem for Linux (WSL) and `rbenv install` indicates that the Ruby version is unavailable, you might be using Ubuntu's default install of `ruby-build`, which only comes with old installs of Ruby (ending before 2.6.) You should uninstall rvm and ruby-build's apt packages (`apt remove rvm ruby-build`) and install them with Git like this: diff --git a/flake.nix b/flake.nix index 79a34b4c41..06afa4a884 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,7 @@ gemConfig = { }; # See available versions here: https://github.com/bobvanderlinden/nixpkgs-ruby/blob/master/ruby/versions.json - ruby = pkgs."ruby-3.3.10"; + ruby = pkgs."ruby-4.0.2"; bundixcli = bundix.packages.${system}.default; in rec {