From c9d59838ce7fe60bfeb1cf97b7b5630061515b52 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 11 Mar 2024 10:13:21 -0700 Subject: [PATCH 1/4] use .ruby-version for setting ruby version --- .github/workflows/deploy.yml | 1 - config/deploy.rb | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a4855e50..e65f9883 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -63,7 +63,6 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.8 # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: get-deployment-config uses: actions/checkout@v4 diff --git a/config/deploy.rb b/config/deploy.rb index d4f0903b..ccb7d007 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -34,7 +34,8 @@ set :linked_dirs, %w{log vendor/bundle tmp/pids tmp/sockets public/system} # rbenv -# set :rbenv_type, :system #or :user +set :rbenv_type, :system +set :rbenv_ruby, File.read('.ruby-version').strip # set :rbenv_ruby, '2.2.5' # set :rbenv_roles, :all # default value From 2e526962e55e98274941856458f8aa8c6b37f373 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 11 Mar 2024 10:16:13 -0700 Subject: [PATCH 2/4] add .ruby-version file --- .gitignore | 2 -- .ruby-version | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 .ruby-version diff --git a/.gitignore b/.gitignore index 4045ab4b..746e4798 100644 --- a/.gitignore +++ b/.gitignore @@ -55,8 +55,6 @@ test/data/ontology_files/repo/**/* *.swp -.ruby-version - config/environments/console.rb config/environments/stage.rb diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..6a81b4c8 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.7.8 From b5d48edcf5ce3cb223c86928474869048abeab14 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 11 Mar 2024 10:30:20 -0700 Subject: [PATCH 3/4] typo fix --- config/deploy/production.rb | 2 +- config/deploy/staging.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 1c61d0f7..85863e46 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -4,7 +4,7 @@ # server in each group is considered to be the first # unless any hosts have the primary property set. # Don't declare `role :all`, it's a meta role -ole :app, %w{api1.prd.ontoportal.org api2.prd.ontoportal.org/} +pole :app, %w{api1.prd.ontoportal.org api2.prd.ontoportal.org/} # Extended Server Syntax # ====================== diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index 8b1afa7b..e86d5dab 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -4,7 +4,7 @@ # server in each group is considered to be the first # unless any hosts have the primary property set. # Don't declare `role :all`, it's a meta role -ole :app, %w{api1.stg.ontoportal.org api2.stg.ontoportal.org} +role :app, %w{api1.stg.ontoportal.org api2.stg.ontoportal.org} # Extended Server Syntax # ====================== From 8df864f6e4bca9b6cb86d214200de848cde148e9 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 11 Mar 2024 11:44:33 -0700 Subject: [PATCH 4/4] enable rbenv capistrano task --- Capfile | 2 +- config/deploy.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Capfile b/Capfile index 7ecc995c..3bf9ae11 100644 --- a/Capfile +++ b/Capfile @@ -16,7 +16,7 @@ install_plugin Capistrano::SCM::Git # https://github.com/capistrano/rails # # require 'capistrano/rvm' -# require 'capistrano/rbenv' +require 'capistrano/rbenv' # require 'capistrano/chruby' require 'capistrano/bundler' # require 'capistrano/rails/assets' diff --git a/config/deploy.rb b/config/deploy.rb index ccb7d007..b4b66e72 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -38,6 +38,8 @@ set :rbenv_ruby, File.read('.ruby-version').strip # set :rbenv_ruby, '2.2.5' # set :rbenv_roles, :all # default value +set :bundle_without, 'development:test' +set :bundle_config, { deployment: true } # do not use sudo set :use_sudo, false