How can I reload a script in IRB?
问题 I am writing a Ruby script for use in the Rails environment, but I chose to run it from irb because reloading the Rails console can be a pain. Now the wait time is much shorter from irb, but I'm bothered that I have to restart irb and require the script everytime I make a change. Is there a simpler way of reloading a script from irb? I found a method in this thread, but that only applies to gem files apparently. My require statement looks like this require "#{File.expand_path(__FILE__)}/..