Skip to content

Commit 3d42abd

Browse files
sc-15228 upgrade ruby to latest 2.7.8 (#5642)
Upgrade Ruby from 2.7.4 to 2.7.8 Ruby 2.7.4 is an older patch version and may contain bugs or security vulnerabilities that have been addressed in later 2.7.x releases. Upgrading to Ruby 2.7.8 ensures we are using the most stable and secure version within the 2.7 series, while maintaining compatibility with existing application code. This addresses: Upgrades the Ruby version from 2.7.4 to 2.7.8. Updates any relevant Dockerfiles, CI configurations, or .ruby-version files to reflect the new version. Ensures compatibility with dependencies and existing application code under Ruby 2.7.8. Updates Bundler version from 2.3.22 to 2.4.22. Upgrades Rails version from 6 to 6.1.7.10. Test instructions: bundle exec rspec
1 parent 1474341 commit 3d42abd

File tree

10 files changed

+74
-73
lines changed

10 files changed

+74
-73
lines changed

.docker/config/nginx/webapp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ server {
88
gzip_types text/html text/plain application/json;
99

1010
passenger_user app;
11-
passenger_ruby /usr/bin/ruby2.7;
11+
passenger_ruby /usr/bin/ruby;
1212
passenger_app_root /home/app;
1313
passenger_enabled on;
1414
passenger_app_env production;

.docker/dev.Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dockerfile development version
2-
FROM ruby:2.7.4
2+
FROM ruby:2.7.8
33

4-
ENV BUNDLE_VERSION 2.3.22
4+
ENV BUNDLE_VERSION 2.4.22
55
ENV EDITOR vim
66

77
## Install dependencies
@@ -11,7 +11,7 @@ RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.lis
1111
RUN apt-get update && apt-get install -y --no-install-recommends yarn
1212
# Redis and Postgres
1313
RUN apt-get update && apt-get install -y redis-server postgresql-client jq
14-
# Node
14+
# Node
1515
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
1616
RUN apt-get update && apt-get install -y --no-install-recommends nodejs
1717
# Install vim
@@ -22,7 +22,6 @@ ENV INSTALL_PATH /opt/app
2222
RUN mkdir -p $INSTALL_PATH
2323
WORKDIR $INSTALL_PATH
2424

25-
# Copy application files
2625
COPY . .
2726

2827
# Install gems

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.4
1+
2.7.8

.semaphore/semaphore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ blocks:
1616
jobs:
1717
- name: Cache everything
1818
commands:
19-
- sem-version ruby 2.7.4
19+
- sem-version ruby 2.7.8
2020
- checkout
2121
# - cache clear
2222
- cache restore

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
source "https://rubygems.org"
2-
ruby "2.7.4"
2+
ruby "2.7.8"
33

44
git_source(:github) do |repo_name|
55
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
66
"https://github.com/#{repo_name}.git"
77
end
88

99
gem "dotenv-rails"
10-
gem "rails", "~> 6"
10+
gem "rails", "6.1.7.10"
1111
gem "active_hash", "~> 2.3.0"
1212
gem "active_record_union"
1313
gem "activerecord-import"

Gemfile.lock

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (6.1.6.1)
5-
actionpack (= 6.1.6.1)
6-
activesupport (= 6.1.6.1)
4+
actioncable (6.1.7.10)
5+
actionpack (= 6.1.7.10)
6+
activesupport (= 6.1.7.10)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
9-
actionmailbox (6.1.6.1)
10-
actionpack (= 6.1.6.1)
11-
activejob (= 6.1.6.1)
12-
activerecord (= 6.1.6.1)
13-
activestorage (= 6.1.6.1)
14-
activesupport (= 6.1.6.1)
9+
actionmailbox (6.1.7.10)
10+
actionpack (= 6.1.7.10)
11+
activejob (= 6.1.7.10)
12+
activerecord (= 6.1.7.10)
13+
activestorage (= 6.1.7.10)
14+
activesupport (= 6.1.7.10)
1515
mail (>= 2.7.1)
16-
actionmailer (6.1.6.1)
17-
actionpack (= 6.1.6.1)
18-
actionview (= 6.1.6.1)
19-
activejob (= 6.1.6.1)
20-
activesupport (= 6.1.6.1)
16+
actionmailer (6.1.7.10)
17+
actionpack (= 6.1.7.10)
18+
actionview (= 6.1.7.10)
19+
activejob (= 6.1.7.10)
20+
activesupport (= 6.1.7.10)
2121
mail (~> 2.5, >= 2.5.4)
2222
rails-dom-testing (~> 2.0)
23-
actionpack (6.1.6.1)
24-
actionview (= 6.1.6.1)
25-
activesupport (= 6.1.6.1)
23+
actionpack (6.1.7.10)
24+
actionview (= 6.1.7.10)
25+
activesupport (= 6.1.7.10)
2626
rack (~> 2.0, >= 2.0.9)
2727
rack-test (>= 0.6.3)
2828
rails-dom-testing (~> 2.0)
2929
rails-html-sanitizer (~> 1.0, >= 1.2.0)
30-
actiontext (6.1.6.1)
31-
actionpack (= 6.1.6.1)
32-
activerecord (= 6.1.6.1)
33-
activestorage (= 6.1.6.1)
34-
activesupport (= 6.1.6.1)
30+
actiontext (6.1.7.10)
31+
actionpack (= 6.1.7.10)
32+
activerecord (= 6.1.7.10)
33+
activestorage (= 6.1.7.10)
34+
activesupport (= 6.1.7.10)
3535
nokogiri (>= 1.8.5)
36-
actionview (6.1.6.1)
37-
activesupport (= 6.1.6.1)
36+
actionview (6.1.7.10)
37+
activesupport (= 6.1.7.10)
3838
builder (~> 3.1)
3939
erubi (~> 1.4)
4040
rails-dom-testing (~> 2.0)
@@ -44,24 +44,24 @@ GEM
4444
active_record_query_trace (1.8)
4545
active_record_union (1.3.0)
4646
activerecord (>= 4.0)
47-
activejob (6.1.6.1)
48-
activesupport (= 6.1.6.1)
47+
activejob (6.1.7.10)
48+
activesupport (= 6.1.7.10)
4949
globalid (>= 0.3.6)
50-
activemodel (6.1.6.1)
51-
activesupport (= 6.1.6.1)
52-
activerecord (6.1.6.1)
53-
activemodel (= 6.1.6.1)
54-
activesupport (= 6.1.6.1)
50+
activemodel (6.1.7.10)
51+
activesupport (= 6.1.7.10)
52+
activerecord (6.1.7.10)
53+
activemodel (= 6.1.7.10)
54+
activesupport (= 6.1.7.10)
5555
activerecord-import (1.4.0)
5656
activerecord (>= 4.2)
57-
activestorage (6.1.6.1)
58-
actionpack (= 6.1.6.1)
59-
activejob (= 6.1.6.1)
60-
activerecord (= 6.1.6.1)
61-
activesupport (= 6.1.6.1)
57+
activestorage (6.1.7.10)
58+
actionpack (= 6.1.7.10)
59+
activejob (= 6.1.7.10)
60+
activerecord (= 6.1.7.10)
61+
activesupport (= 6.1.7.10)
6262
marcel (~> 1.0)
6363
mini_mime (>= 1.1.0)
64-
activesupport (6.1.6.1)
64+
activesupport (6.1.7.10)
6565
concurrent-ruby (~> 1.0, >= 1.0.2)
6666
i18n (>= 1.6, < 2)
6767
minitest (>= 5.1)
@@ -77,6 +77,7 @@ GEM
7777
activerecord (>= 4.0)
7878
autoprefixer-rails (10.4.7.0)
7979
execjs (~> 2)
80+
base64 (0.2.0)
8081
bcp47 (0.3.3)
8182
i18n
8283
bcrypt (3.1.18)
@@ -352,7 +353,7 @@ GEM
352353
lumberjack (1.2.8)
353354
mail (2.7.1)
354355
mini_mime (>= 0.1.1)
355-
marcel (1.0.2)
356+
marcel (1.0.4)
356357
matrix (0.4.2)
357358
memery (1.4.1)
358359
ruby2_keywords (~> 0.0.2)
@@ -436,20 +437,20 @@ GEM
436437
rack
437438
rack-test (2.1.0)
438439
rack (>= 1.3)
439-
rails (6.1.6.1)
440-
actioncable (= 6.1.6.1)
441-
actionmailbox (= 6.1.6.1)
442-
actionmailer (= 6.1.6.1)
443-
actionpack (= 6.1.6.1)
444-
actiontext (= 6.1.6.1)
445-
actionview (= 6.1.6.1)
446-
activejob (= 6.1.6.1)
447-
activemodel (= 6.1.6.1)
448-
activerecord (= 6.1.6.1)
449-
activestorage (= 6.1.6.1)
450-
activesupport (= 6.1.6.1)
440+
rails (6.1.7.10)
441+
actioncable (= 6.1.7.10)
442+
actionmailbox (= 6.1.7.10)
443+
actionmailer (= 6.1.7.10)
444+
actionpack (= 6.1.7.10)
445+
actiontext (= 6.1.7.10)
446+
actionview (= 6.1.7.10)
447+
activejob (= 6.1.7.10)
448+
activemodel (= 6.1.7.10)
449+
activerecord (= 6.1.7.10)
450+
activestorage (= 6.1.7.10)
451+
activesupport (= 6.1.7.10)
451452
bundler (>= 1.15.0)
452-
railties (= 6.1.6.1)
453+
railties (= 6.1.7.10)
453454
sprockets-rails (>= 2.0.0)
454455
rails-controller-testing (1.0.5)
455456
actionpack (>= 5.0.1.rc1)
@@ -465,9 +466,9 @@ GEM
465466
ruby-graphviz (~> 1.2)
466467
rails-html-sanitizer (1.4.3)
467468
loofah (~> 2.3)
468-
railties (6.1.6.1)
469-
actionpack (= 6.1.6.1)
470-
activesupport (= 6.1.6.1)
469+
railties (6.1.7.10)
470+
actionpack (= 6.1.7.10)
471+
activesupport (= 6.1.7.10)
471472
method_source
472473
rake (>= 12.2)
473474
thor (~> 1.0)
@@ -677,7 +678,8 @@ GEM
677678
semantic_range (>= 2.3.0)
678679
webrick (1.9.1)
679680
websocket (1.2.10)
680-
websocket-driver (0.7.5)
681+
websocket-driver (0.7.7)
682+
base64
681683
websocket-extensions (>= 0.1.0)
682684
websocket-extensions (0.1.5)
683685
whenever (1.0.0)
@@ -776,7 +778,7 @@ DEPENDENCIES
776778
puma
777779
rack-attack
778780
rack-mini-profiler
779-
rails (~> 6)
781+
rails (= 6.1.7.10)
780782
rails-controller-testing
781783
rails-erd
782784
rb-readline
@@ -827,7 +829,7 @@ DEPENDENCIES
827829
zip_kit
828830

829831
RUBY VERSION
830-
ruby 2.7.4p191
832+
ruby 2.7.8p225
831833

832834
BUNDLED WITH
833-
2.3.22
835+
2.4.22

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ bin/docker-down
107107
If the included `bin/setup` script fails for some reason, you can also manually
108108
set up the application step by step. You can do so as follows.
109109

110-
First, you need to [install ruby](https://www.ruby-lang.org/en/documentation/installation). It is recommended to use [rbenv](https://github.com/rbenv/rbenv) to manage ruby versions. Note that we currently use Bundler version 2.3.22, so that is also hardcoded below.
110+
First, you need to [install ruby](https://www.ruby-lang.org/en/documentation/installation). It is recommended to use [rbenv](https://github.com/rbenv/rbenv) to manage ruby versions. Note that we currently use Bundler version 2.4.22, so that is also hardcoded below.
111111

112112
Next, [install NodeJS v18.11.0](https://nodejs.org/en/) using [nvm](https://github.com/nvm-sh/nvm).
113113

114114
```bash
115-
gem install bundler -v 2.3.22
116-
bundle _2.3.22_ install
115+
gem install bundler -v 2.4.22
116+
bundle _2.4.22_ install
117117
brew install nvm
118118
nvm install 18.11.0
119119
rake yarn:install

bin/setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -euo pipefail
55
RUBY_VERSION=$(cat .ruby-version)
66
} > /dev/null 2>&1
77

8-
BUNDLER_VERSION=2.3.22
8+
BUNDLER_VERSION=2.4.22
99

1010
init (){
1111
verify_ruby_version && verify_node_version

script/semaphore_deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ echo "Beginning deploy of $SEMAPHORE_GIT_SHA to $deploy_target..."
1717
source ~/.toolbox/toolbox
1818

1919
export DD_PROFILING_NO_EXTENSION=true
20-
sem-version ruby 2.7.4
20+
sem-version ruby 2.7.8
2121
cache restore
2222
yarn install
2323
bundle config set deployment 'true'

script/semaphore_setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source ~/.toolbox/toolbox
88
cache clear
99

1010
export DD_PROFILING_NO_EXTENSION=true
11-
sem-version ruby 2.7.4
11+
sem-version ruby 2.7.8
1212
sem-service start postgres 14
1313
sem-service start redis 5
1414

0 commit comments

Comments
 (0)