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