diff --git a/manifests/init.pp b/manifests/init.pp index a937dc8..51665b3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -185,13 +185,6 @@ class mastodon ( timeout => 0, require => File['/usr/local/bin/install_ruby.sh'], } - exec { 'set_global_ruby_version': - command => "${mastodon_home}/.rbenv/libexec/rbenv global 3.2.2", - user => $mastodon_user, - cwd => "${mastodon_home}/.rbenv/", - # creates => '', - require => Exec['install_ruby'], - } # exec { 'install_bundler': # command => 'gem install bundler --no-document', # user => $mastodon_user, diff --git a/templates/install_ruby.sh.erb b/templates/install_ruby.sh.erb index 94f8057..3935c34 100644 --- a/templates/install_ruby.sh.erb +++ b/templates/install_ruby.sh.erb @@ -4,4 +4,6 @@ set -euo pipefail if [ ! -e '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/ruby' ]; then cd '<%= @mastodon_home %>' 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 fi