#ruby - 22 December 2018
« Back 1 day Forward 1 day »
[00:01:51] cthulchu_: on the other hand, it's uncomfy to not being able to pass arguments by reference
[12:34:15] za1b1tsu: When using the ruby readline library, there was a key combination to give multiline input
[16:47:24] isene: Because of this (https://bugs.launchpad.net/ubuntu/+source/ruby-defaults/+bug/1809500) I need to downgrade from Ruby 2.5.1 to maybe 2.2 or even 1.9 for my whole system (Ubuntu 18.10). How can I do that in the best possible way?
[16:50:55] havenwood: isene: Brightbox maintains multiple Ruby version packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
[16:53:32] havenwood: isene: You can alternatively just build Ruby yourself. There are handy tools to make that easy: https://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
[16:56:47] isene: So, I should remove my Ruby installation for my 18.10 system (which can only be Ruby 2.5.1) and download e.g. 2.2 and install that manually, I guess? But I wonder if that will break anything else...
[16:58:23] isene: But how do I ensure my script will confine itself (with my imap calls) to e.g. 2.2?
[16:58:50] havenwood: isene: You can use ruby-switch with the Brightbox packages or chruby if you build it yourself.
[17:00:00] havenwood: isene: All chruby really does is put the Ruby you select and its gems in front of your PATH and set other env vars like GEM_HOME and GEM_PATHS.
[17:01:28] isene: havenwood: Let's say I go with Brightbox packages (seems easy), what is ruby-switch? My script is core Ruby with no gem dependencies
[17:02:38] havenwood: isene: see: https://www.brightbox.com/docs/ruby/ubuntu#switching-the-default-ruby-version
[17:09:42] isene: I see that 2.5.1 is also the version on Ubuntu 18.04... :-O That's odd since the bug wasn't there in 18.04 - but it is in 18.10. I wonder what changed...
[21:54:51] isene: havenwood: This is getting weirder by the minute - the bug (https://bugs.launchpad.net/ubuntu/+source/ruby-defaults/+bug/1809500) seems to actually not be Ruby specific - because I purged my Ruby 2.5.1 that comes with Ubuntu 18.10 and installed 2.5.3 and 2.4.5 and tried both - and they both show up with the bug. So, my conclusion must be that there is something else wrong in 18.10. But WTF?