I work with rails console and often i need to preload some ruby code to work with.
#file that i want to load in rails console
#my_file.rb
a = 1
b = 2
puts a + b
When i run my console with ./script/console
rails-console :001 > load 'my_file.rb'
3
=> []
rails-console :002 > a
NameError: undefined local variable or method 'a' for #<Object:123445>
How can i get access to my 'a' and 'b' variables in console?