From cffd6071f0e746e88dabfbd7730574d6ddb754af Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Mon, 9 Sep 2019 02:52:02 +0500 Subject: [PATCH] Improve code --- config/deploy.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/deploy.rb b/config/deploy.rb index 0a08d61..9298048 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -51,4 +51,7 @@ append :linked_dirs, # before first deploy. # set :ssh_options, verify_host_key: :secure -set :rvm_ruby_version, '2.6.2@partynest' +ruby_version = File.read(File.expand_path('.ruby-version', __dir__)).chomp +ruby_gemset = File.read(File.expand_path('.ruby-gemset', __dir__)).chomp + +set :rvm_ruby_version, "#{ruby_version}@#{ruby_gemset}"