Got this after upgrading to v1.11.0
mech opened this issue · comments
I think this is likely related to #817, which surfaces errors that were previously swallowed.
Can you help me debug the problem with these steps:
- Add something like
puts "root irbrc is loaded"
to/root/.irbrc
- Switch back to an IRB version that previously worked (e.g.
v1.10.0
) - Start IRB and see if that message is printed
And based on the result, we'll learn what's the root problem:
- If the message is not printed, it means that
/root/irbrc
was never loaded successfully, even though it exists. I think it may be caused by permission issues. - If the message is printed, it means #817 changed the loading behaviour unexpectedly.
I think IRB was not loading /root/.irbrc
in previous version too. irb-1.11.0 is just fixed to show the error which was hidden before.
I think you have ENV['IRBRC']
specified. According to the log, rvm is adding it, and the specified irbrc file has a bug in line 9.
I think the content of irbrc is same or similar to this one.
https://github.com/rvm/rvm/blob/84ab322b44d88540c24d5e102a4dae0bbe17ce7e/scripts/irbrc
if ENV["rvm_path"].nil?
# Should check file existence before require, or rescue from LoadError
# It does not load `/root/.irbrc` but loads `/root/irbrc`. This is not IRB way.
require File.join(ENV["HOME"], "irbrc")
else
require File.join(ENV["rvm_path"], "scripts", "irbrc")
end
Workaround for the error message in rvm's irbrc way is to rename /root/.irbrc
to /root/irbrc
.
I will do the test, but I am curious why is it /root/irbrc and not /root/.irbrc with a "dot" there.
I'm closing because it's a problem of rvm.
Probably related to:
rvm/rvm#3451
rvm/rvm#3701
rvm/rvm#5350