From 3bff2f0cc866a7b0c130f7a918f2e96c0a73132c Mon Sep 17 00:00:00 2001 From: loqimean Date: Tue, 8 Oct 2024 18:30:36 +0300 Subject: [PATCH] chore: downgrade ruby to version with pre-builded binary --- .github/workflows/ci.yml | 4 ++-- .ruby-version | 2 +- Capfile | 8 ++------ Dockerfile | 2 +- Gemfile | 3 ++- Gemfile.lock | 6 +++++- README.md | 2 +- config/deploy.rb | 2 +- config/deploy/production.rb | 1 + config/deploy/staging.rb | 7 ++++--- 10 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ee6c7a6a..4335857a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.5 + ruby-version: 3.2.3 bundler-cache: true cache-version: 1 - name: Run rubocop @@ -48,7 +48,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.5 + ruby-version: 3.2.3 bundler-cache: true - uses: actions/setup-node@v1 diff --git a/.ruby-version b/.ruby-version index ac5570973..ab96aa90d 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.2.5 +ruby-3.2.3 diff --git a/Capfile b/Capfile index ece9858cc..466e3399b 100644 --- a/Capfile +++ b/Capfile @@ -10,11 +10,7 @@ require "capistrano/rails/migrations" require "capistrano/passenger" require "capistrano/rails_tail_log" require "capistrano/rails" -require "capistrano/rbenv" -require "dotenv" - -set :rbenv_type, :user - -Dotenv.load +require "capistrano/rvm" +# require "capistrano/rbenv" Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } diff --git a/Dockerfile b/Dockerfile index 67dacbaea..fc2334fce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.2.5 +FROM ruby:3.2.3 ENV BUNDLER_VERSION=2.2.8 diff --git a/Gemfile b/Gemfile index 983405b93..0d43077b8 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "3.2.5" +ruby "3.2.3" gem "mutex_m", "0.1.2" gem "cancancan", "~> 3.3" @@ -76,6 +76,7 @@ group :development do gem "capistrano-rails", "~> 1.4" gem "capistrano-passenger", "~> 0.2.0" gem "capistrano-rbenv", "~> 2.1", ">= 2.1.4" + gem "capistrano-rvm" gem "capistrano-yarn" gem "capistrano-rails-tail-log" gem "ed25519" diff --git a/Gemfile.lock b/Gemfile.lock index 20972cde4..4251970b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,6 +133,9 @@ GEM capistrano-rbenv (2.2.0) capistrano (~> 3.1) sshkit (~> 1.3) + capistrano-rvm (0.1.2) + capistrano (~> 3.0) + sshkit (~> 1.2) capistrano-yarn (2.0.2) capistrano (~> 3.0) capybara (3.39.2) @@ -607,6 +610,7 @@ DEPENDENCIES capistrano-rails (~> 1.4) capistrano-rails-tail-log capistrano-rbenv (~> 2.1, >= 2.1.4) + capistrano-rvm capistrano-yarn capybara (>= 3.26) codecov @@ -672,7 +676,7 @@ DEPENDENCIES webdrivers (~> 5.3.1) RUBY VERSION - ruby 3.2.5p208 + ruby 3.2.3p157 BUNDLED WITH 2.4.18 diff --git a/README.md b/README.md index 5e4d06664..71f4f6196 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The latest version from the release branch 'master' is automatically deployed to # Required to install -- Ruby 3.2.5 +- Ruby 3.2.3 - Ruby on Rails 7.1.2 - PostgreSQL 12 - Puma as a web server diff --git a/config/deploy.rb b/config/deploy.rb index 9c1e2f2f9..a9298d74c 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -24,7 +24,7 @@ # set :pty, true # Default value for :linked_files is [] -set :linked_files, fetch(:linked_files, []).push(".env", "config/database.yml") +set :linked_files, fetch(:linked_files, []).push("config/database.yml") # Default value for linked_dirs is [] set :linked_dirs, fetch(:linked_dirs, []).push("log", "tmp/pids", "tmp/cache", "tmp/sockets", "vendor/bundle", "public/system", "public/uploads", "storage") diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 1f6e514e0..48cffdc71 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -1,6 +1,7 @@ require "capistrano/yarn" set :user, "deploy" +set :rbenv_type, :user server "185.233.37.137", user: fetch(:user), roles: ["app", "db", "web"], primary: true, port: 22 diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index 3619d7bee..aa73f2c17 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,6 +1,6 @@ -set :user, "bitnami" +set :user, "ubuntu" -server "3.120.151.175", user: fetch(:user), roles: ["app", "db", "web"], primary: true, port: 22 +server "51.44.25.104", user: fetch(:user), roles: ["app", "db", "web"], primary: true, port: 22 set :passenger_restart_with_touch, true set :deploy_to, "/home/#{fetch(:user)}/#{fetch(:application)}" @@ -14,4 +14,5 @@ set :rails_env, "staging" set :branch, :develop -set :rbenv_ruby, "3.2.5" +set :rvm_ruby, "3.2.3" +set :rvm_custom_path, "/usr/share/rvm"