Pass ruby script file to rails console October 28, 2022 by Tarik Actually, the simplest way is to run it with load inside the rails console load './path/to/foo.rb'