<postmodern>
just double checking, does String have an #each_slice like method for splitting the string into substrings of a given length?
roadie`` has quit [Remote host closed the connection]
roadie`` has joined #ruby
noa has quit [Quit: Leaving]
postmodern has quit [Read error: Connection reset by peer]
mrkz_c has quit [Quit: Connection closed for inactivity]
graywolf has joined #ruby
ByteEater has joined #ruby
ByteEater is now known as YourNick
YourNick is now known as ByteEater
<ByteEater>
Hello, good people! How can I install Ruby 3.0.2 on Ubuntu Bionic 18.0? I've tried with apt and also with rbenv, but only Ruby 1 and 2 versions are available.
roadie`` has quit [Ping timeout: 240 seconds]
<weaksauce>
ByteEater try ruby-install
<weaksauce>
ruby-install ruby 3.0.2 should do you
<ByteEater>
vagrant@ubuntu-bionic:/vagrant/backend$ apt-cache show ruby-install
<ByteEater>
N: Unable to locate package ruby-install
<ByteEater>
it's not installed and not available in the repositories, it seems
<weaksauce>
ByteEater should be able to nab it off github
<ByteEater>
I should have probably done ruby-install --system 3.0.2 though
<weaksauce>
maybe what's your use case?
<weaksauce>
chruby is made for ruby-install and it's about 70 lines of bash
<ByteEater>
I have a Vagrant virtual machine with Ubuntu 18 and it just installs on provisioning the Ruby version for that distro which is 2.5.1, I want to change it to 3.0.2
<ByteEater>
first manually to see how to make everything work and then automate it in the provisioning script
<ByteEater>
not having to wait almost half an hour for provisioning would be a huge bonus
<weaksauce>
might need to do some kind of packaging thing then
<weaksauce>
and have vagrant pull it from it
ur5us has joined #ruby
<ByteEater>
so there's no PPA or any other source of prepackaged Ruby 3.0.2 for Ubuntu?
kiki_lamb has quit [Quit: Lost terminal]
<weaksauce>
maybe?
<weaksauce>
system ruby lags behind usually quite a bit
<ByteEater>
one more question: if I stick to ruby-install, should I call it with sudo from a non-provileged user, or doesn't it matter?
<ByteEater>
with bundle there's a warning that it might do something wrong when run as root and so sudo should be used, so I'm wondering if it's the same with ruby-install
<ByteEater>
wait, something's wrong
<ByteEater>
despite >>> Successfully installed ruby 3.0.2 into /usr/local
<ByteEater>
and `which ruby` outputting `/usr/local/bin/ruby` (used to be `/usr/bin/ruby` before running `sudo ruby-install --system 3.0.2`)
<ByteEater>
I get from `ruby -v`: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
<weaksauce>
curious
<ByteEater>
must be some bash quirk, in new bash it outputs the expected: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
<ByteEater>
weaksauce, could you, please, look at the "one more question" above?
ur5us has quit [Ping timeout: 250 seconds]
roadie`` has quit [Ping timeout: 250 seconds]
roadie`` has joined #ruby
roadie`` has quit [Ping timeout: 240 seconds]
ByteEater has quit [Ping timeout: 246 seconds]
roadie`` has joined #ruby
kiki_lamb has joined #ruby
roadie`` has quit [Ping timeout: 250 seconds]
perrierjouet has quit [Quit: WeeChat 3.2]
jpw has joined #ruby
graywolf has quit [Ping timeout: 248 seconds]
roadie`` has joined #ruby
neshpion has quit [Quit: neshpion]
roadie`` has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
roadie has joined #ruby
kaivai has quit [Ping timeout: 248 seconds]
goepsilongo has joined #ruby
goepsilongo_ has quit [Ping timeout: 240 seconds]
reset has quit [Quit: reset]
ur5us has joined #ruby
dachi_ has joined #ruby
Oxfuxxx has quit [Ping timeout: 268 seconds]
Oxfuxxx has joined #ruby
_ht has joined #ruby
hololeap has quit [Quit: Bye]
dachi_ has quit [Remote host closed the connection]
<ByteEater>
anyways, I actually don't need a Ruby switcher in the Vagrant machine, just Ruby 3.0.2
<ByteEater>
so far the option you suggested – using ruby-install – looks like the best one (because there are no others), its main downside being taking a long time