From f9bccfa7b37af1bbb694c4e0cb7cf878d49c57f1 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 28 Nov 2023 14:23:53 +0200 Subject: [PATCH] add path to script --- templates/install_mastodon.sh.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/install_mastodon.sh.erb b/templates/install_mastodon.sh.erb index eeedb1d..4402ac1 100644 --- a/templates/install_mastodon.sh.erb +++ b/templates/install_mastodon.sh.erb @@ -4,7 +4,8 @@ set -euo pipefail if [ ! -e '<%= @mastodon_home %>/.mastodon_install' ]; then cd '<%= @mastodon_home %>' echo "Installing ruby..." - source '<%= @mastodon_home %>/.bashrc' + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$($HOME/.rbenv/bin/rbenv init -)" sudo -u <%= @mastodon_user %> RUBY_CONFIGURE_OPTS=--with-jemalloc '<%= @mastodon_home %>/.rbenv/bin/rbenv' install '<%= @ruby_version %>' sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/bin/rbenv' global '<%= @ruby_version %>' sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/gem' install bundler --no-document