title: How to run a .rb file from IRB?
body: <p>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 my current directory.</p>
  
  <p>My question is how do I run a .rb file  in IRB?<br>
  And do I have to be in the directory where this .rb file lives when I run it in IRB?</p>
  
  <p>I tried the following: just typing <code>irb</code> on the command line in the directory of the file. That starts an IRB session as far as I understand.<br>
  Then I typed <code>irb "filename.rb"</code> which went through but didn't create anything in the current directory but at least it didn't give any errors.</p>
  
  <p>I also tried a whole bunch of other stuff that plain gave me errors. So I don't think I can solve this myself and googling the matter didn't help at all.</p>
  
  <p>I am running Leopard.</p>