I'm a bit confused, and it's actually a Ruby- or more a Ubuntu-problem, not mastodon-related in a regular way.
For Mastodon 4.1.2 it's recommend (and necessary) to install Ruby 3.0.6. As root it's no problem. This version could be installed on my ubuntu 22.0.4 and rbenv global
is set to 3.0.6. But after switching to the mastodon user, ruby 3.0.4 is still set (for global
and local
) and 3.0.6 is not installed and cannot be installed by rbenv install 3.0.6
and it can also not be found with the git
command!
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.6
results in
ruby-build: definition not found: 3.0.6
See all available versions with `rbenv install --list'.
If the version you need is missing, try upgrading ruby-build:
git -C /home/mastodon/.rbenv/plugins/ruby-build pull
... and even if I try it with git -C /home/mastodon/.rbenv/plugins/ruby-build pull
the version 3.0.6 is not listed.
I can see share/ruby-build/3.0.4
but the next is share/ruby-build/3.1.0
. And both versions don't work to start the update process for mastodon 4.1.2.
I'm not much familiar with ruby, but it looks to me, that there is a different and a kind of standalone version of ruby, installed for mastodon as the user mastodon, which is independent from the installation with root, right? So, how to upgrade, if it's not possible to upgrade it like here mentioned?
Versions
Update 2023/04/09
Result of rbenv install --list
↓
2.7.6
3.0.4
3.1.2
jruby-9.3.9.0
mruby-3.1.0
picoruby-3.0.0
rbx-5.0
truffleruby-22.3.0
truffleruby+graalvm-22.3.0
Update 2023/04/13
Dirty solution (but without knowing the reason for the issue I described above): I deleted the folder and cloned it again.
rm -rf /home/mastodon/.rbenv/plugins/ruby-build
git clone https://github.com/rbenv/ruby-build.git /home/mastodon/.rbenv/plugins/ruby-build
Solution that helped... even though the real issue couldn't be found: I deleted the folder and cloned it again.
rm -rf /home/mastodon/.rbenv/plugins/ruby-build
git clone https://github.com/rbenv/ruby-build.git /home/mastodon/.rbenv/plugins/ruby-build