Is there a way to pass ruby file, foo.rb to rails console. Expected results would be after console starts rails environment to run file.
Or any other way which
Actually, the simplest way is to run it with load inside the rails console
load
rails console
load './path/to/foo.rb'