I am starting out with Ruby on Rails. I am currently going through a tutorial where it says that I have to run a .rb file from IRB and that that will create a .xml file in m
In case you want to have your file loaded in the irb session and you are using Ruby 2+ you can load a file in irb like this:
irb -r ./the_name_of_your_file.rb
This opens an irb session with the given file loaded.
Imagine you have file with a class like this:
class Example
def initialize(name)
@name = name
end
def print__example
p name
end
end
You will be able to use the Example class in the irb session.