Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rvm .irbrc file incompatible with irb >= 1.11.0 #5449

Open
CamJN opened this issue Mar 25, 2024 · 1 comment
Open

rvm .irbrc file incompatible with irb >= 1.11.0 #5449

CamJN opened this issue Mar 25, 2024 · 1 comment

Comments

@CamJN
Copy link

CamJN commented Mar 25, 2024

Description

Because of ruby/irb#817 the .irbrc file at /usr/local/rvm/rubies/ruby-3.3.0/.irbrc throws warnings on startup.

Steps to reproduce

  1. install ruby 3.3
  2. run bundle init
  3. run bundle exec irb

Expected behavior

Irb prompt with no warnings

Actual behavior

Environment info

ruby-3.3.0:

  system:
    uname:        "Linux dc7124048882 6.5.0-26-generic #26-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar  5 21:19:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux"
    name:         "Ubuntu"
    version:      "22.04"
    architecture: "x86_64"
    bash:         "/usr/bin/bash => GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)"
    zsh:          " => not installed"
    remote_path:  "ubuntu/22.04/x86_64"

  rvm:
    version:      "1.29.12-next (master)"
    updated:      "4 minutes 7 seconds ago"
    path:         "/usr/local/rvm"
    autolibs:     "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

  ruby:
    interpreter:  "ruby"
    version:      "3.3.0"
    date:         "2023-12-25"
    platform:     "x86_64-linux"
    patchlevel:   "2023-12-25 revision 5124f9ac75"
    full_version: "ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]"

  homes:
    gem:          "/usr/local/rvm/gems/ruby-3.3.0"
    ruby:         "/usr/local/rvm/rubies/ruby-3.3.0"

  binaries:
    ruby:         "/usr/local/rvm/rubies/ruby-3.3.0/bin/ruby"
    irb:          "/usr/local/rvm/rubies/ruby-3.3.0/bin/irb"
    gem:          "/usr/local/rvm/rubies/ruby-3.3.0/bin/gem"
    rake:         "/usr/local/rvm/rubies/ruby-3.3.0/bin/rake"

  environment:
    PATH:         "/usr/local/rvm/gems/ruby-3.3.0/bin:/usr/local/rvm/gems/ruby-3.3.0@global/bin:/usr/local/rvm/rubies/ruby-3.3.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/rvm/bin"
    GEM_HOME:     "/usr/local/rvm/gems/ruby-3.3.0"
    GEM_PATH:     "/usr/local/rvm/gems/ruby-3.3.0:/usr/local/rvm/gems/ruby-3.3.0@global"
    MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-3.3.0"
    IRBRC:        "/usr/local/rvm/rubies/ruby-3.3.0/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

Suggested solution:

Use load instead of require in RVM's .irbrc. require expects an .rb extension which irbrc does not have, so require will fail, but load does not make that assumption so it will work.

@LocoDelAssembly
Copy link

Worth mentioning that despite it says it will load .irbrc from user's home folder, it actually loads irbrc (no dot).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants