From 299888f01c262ae192f81045e06966cc1d5f2fe1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 11 Mar 2021 02:35:15 +0100 Subject: [PATCH] Fix upgrade --- scripts/_common.sh | 5 +++-- scripts/upgrade | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 3c3e2d2..62dd046 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -273,8 +273,9 @@ ynh_use_ruby () { ynh_ruby_load_path="PATH=$PATH" # Sets the local application-specific Ruby version - (cd $final_path - rbenv local $ruby_version) + pushd $final_path + rbenv local $ruby_version + popd } # Install a specific version of Ruby diff --git a/scripts/upgrade b/scripts/upgrade index 2a90acf..15fedd2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -176,6 +176,7 @@ ynh_script_progression --message="Upgrading dependencies..." ynh_install_app_dependencies $pkg_dependencies ynh_install_ruby --ruby_version=$RUBY_VERSION +ynh_use_ruby #================================================= # CREATE DEDICATED USER @@ -264,7 +265,6 @@ then chown -R $app: $final_path pushd "$final_path" - ynh_use_ruby # Install bundler, a gems installer ynh_gem install bundler # Install without documentation