At some point, after a system upgrade, irb is not functional any longer: % ruby --version ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux] % irb Traceback (most recent call last): 2: from /usr/bin/irb:23:in `<main>' 1: from /usr/lib64/ruby/site_ruby/2.6.0/rubygems.rb:302:in `activate_bin_path' /usr/lib64/ruby/site_ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem irb (>= 0.a) with executable irb (Gem::GemNotFoundException) All my stable systems that have updated to the current stable ruby 2.6.6-r2 seem to have this problem. On an older system still using ruby 2.5.8 everything works fine: % ruby --version ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-linux] % irb irb(main):001:0> "yay it works" => "yay it works" Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.32-r6, 5.10.12 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.10.12-x86_64-AMD_Ryzen_5_2400G_with_Radeon_Vega_Graphics-with-glibc2.2.5 KiB Mem: 30820200 total, 955128 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Fri, 12 Feb 2021 00:45:01 +0000 sh dash 0.5.11.3-r1 ld GNU ld (Gentoo 2.34 p6) 2.34.0 ccache version 4.1 [enabled] app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 2.7.18-r5::gentoo, 3.7.9::gentoo, 3.8.7-r1::gentoo, 3.9.1-r1::gentoo dev-util/ccache: 4.1::gentoo dev-util/cmake: 3.18.5::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.2-r1::gentoo sys-devel/binutils: 2.34-r2::gentoo, 2.35.1-r1::gentoo sys-devel/gcc: 9.3.0-r2::gentoo sys-devel/gcc-config: 2.3.2-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r6::gentoo Repositories: gentoo location: /srv/repos/gentoo sync-type: null sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 gentoo-draconx location: /srv/repos/gentoo-draconx masters: gentoo gentoo-fixes location: /srv/repos/gentoo-fixes masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=znver1" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=znver1" DISTDIR="/srv/mirror/gentoo/distfiles" EMERGE_DEFAULT_OPTS="-j5 --keep-going --dynamic-deps=n --autounmask --autounmask-write=n --unordered-display --verbose-conflicts --binpkg-respect-use=y --with-bdeps-auto=n" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=znver1" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=znver1" GENTOO_MIRRORS="http://distfiles.gentoo.org" INSTALL_MASK="/usr/share/cursors/xorg-x11/default /etc/alsa/conf.d/51-pulseaudio-probe.conf /etc/portage/*postsync.d /etc/gssproxy/??-*.conf" LANG="en_CA.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j8 -l12" PKGDIR="/var/cache/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X aacs acl alsa amd64 bdplus berkdb bluray bs2b bzip2 cairo cdda cli crypt cups dav1d doc dri dvd egl exif flac fontconfig fortran gdbm iconv idn ipv6 jpeg jpeg2k kerberos lcms libglvnd libtirpc mp3 multilib ncurses nls nptl ogg opencl opengl openmp opus pam pcre perl png python readline seccomp split-usr ssl svg tcpd threads tiff truetype unicode vaapi vim-syntax vorbis vulkan webp xattr xft xinerama zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="ARM" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python2_7" RUBY_TARGETS="ruby26" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= dev-lang/ruby-2.6.6-r2::gentoo was built with the following: USE="berkdb doc gdbm ipv6 rdoc ssl -debug -examples -jemalloc -jit (-libressl) -rubytests -socks5 -static-libs -systemtap -tk -xemacs" ABI_X86="(64)" CFLAGS="-O2 -pipe -march=znver1 -fno-strict-aliasing" CXXFLAGS="-O2 -pipe -march=znver1 -fno-strict-aliasing"
This is a regression in rubygems. Updating to a newer version of rubygems (for ruby 2.6 that would be rubygems 3.0.9 should fix this. I've filed a stable bug for this version.
All seems to be working now, thanks!