About Ubuntu 22, I got it working again. I’m just an idiot.
My original issue was that rbenv
would contain only the 3.3.0-dev version.
I would get this kind of error:
(base) arkshine@HOME:~/discourse$ rake db:migrate
Sorry, you can't use byebug without Readline. To solve this, you need to
rebuild Ruby with Readline support. If using Ubuntu, try sudo apt-get install libreadline-dev and then reinstall your Ruby.
rake aborted!
LoadError: cannot load such file -- readline (LoadError)
/home/arkshine/discourse/config/application.rb:44:in '<top (required)>'
internal:/home/arkshine/.rbenv/versions/3.3.0-dev/lib/ruby/3.5.0+0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require'
internal:/home/arkshine/.rbenv/versions/3.3.0-dev/lib/ruby/3.5.0+0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require'
/home/arkshine/discourse/Rakefile:7:in '<top (required)>'
(See full trace by running task with --trace)
The solution is to upgrade rbenv
:
git -C ~/.rbenv/plugins/ruby-build pull
Then you can install a more recent and stable version:
(base) arkshine@HOME:~/discourse$ rbenv install --list
3.1.6
3.2.7
3.3.7
3.4.2
rbenv install 3.3.7
rbenv global 3.3.7
rbenv rehash
And now, it’s working again!