From 945d2212e201cfb6469453e9160cc1ce22a69a9a Mon Sep 17 00:00:00 2001 From: Eito Katagiri Date: Sat, 11 Dec 2021 00:29:50 +0900 Subject: [PATCH] update ruby to 2.7.4 --- .circleci/Dockerfile | 13 ++++++++----- .circleci/config.yml | 2 +- .ruby-version | 2 +- Dockerfile | 2 +- Gemfile | 2 +- Gemfile.lock | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile index a8f712ae4..9c5aa27f8 100644 --- a/.circleci/Dockerfile +++ b/.circleci/Dockerfile @@ -2,17 +2,15 @@ FROM public.ecr.aws/amazonlinux/amazonlinux:2 RUN /usr/bin/amazon-linux-extras install -y \ postgresql11 \ - python3.8 \ - ruby2.6 + python3.8 RUN /usr/bin/yum install -y \ gcc \ gcc-c++ \ git \ make \ + openssl-devel \ postgresql-devel \ rpm-build \ - ruby-devel \ - rubygem-io-console \ shadow-utils \ sudo \ util-linux \ @@ -37,7 +35,12 @@ RUN /usr/sbin/adduser -m circleci&& usermod -aG wheel circleci RUN /usr/bin/sed -i -e "s/^# %wheel/%wheel/" /etc/sudoers USER circleci -ENV PATH /home/circleci/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +RUN git clone https://github.com/sstephenson/rbenv.git ~/.rbenv +RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build +ENV PATH /home/circleci/.rbenv/bin:/home/circleci/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +RUN echo 'eval "$(rbenv init -)"' >> ~/.bash_profile +RUN eval "$(rbenv init -)" +RUN rbenv install 2.7.4 RUN sudo /usr/bin/pip3.8 install --upgrade pip RUN sudo /usr/local/bin/pip3.8 install awscli awsebcli diff --git a/.circleci/config.yml b/.circleci/config.yml index c3e6144c2..61a231ba6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: safecast/api-build:2.6.8-amazonlinux2 + - image: safecast/api-build:2.7.4-amazonlinux2 environment: RAILS_ENV: test AWS_DEFAULT_REGION: us-west-2 diff --git a/.ruby-version b/.ruby-version index 743af5e12..a4dd9dba4 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.8 +2.7.4 diff --git a/Dockerfile b/Dockerfile index a52b076aa..76578c98f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6.8 +FROM ruby:2.7.4 RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" >> /etc/apt/sources.list.d/pgdg.list RUN curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - diff --git a/Gemfile b/Gemfile index 4c3f186ff..05717cf45 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '2.6.8' +ruby '2.7.4' gem 'rails', '~> 6.0.3.7' diff --git a/Gemfile.lock b/Gemfile.lock index 96a556b0f..8288bdea2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -580,7 +580,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 2.6.8-p205 + ruby 2.7.4-p191 BUNDLED WITH 2.2.29