History not saving
问题 Why is my irb history no longer saving? 回答1: It turns out that ruby 1.8.7 introduced a bug whereby finalizers are no longer guaranteed to run. To resolve this, I added the following code snippet to my .irbrc file: require 'irb/ext/save-history' Kernel.at_exit do IRB::HistorySavingAbility.create_finalizer.call(IRB.CurrentContext.instance_variable_get(:@io).send(:binding)) end 回答2: I ran into this with ruby 2.3.7 as well. It was caused by rvm ruby package not having the correct permissions to