title: How do you open Firefox and multiple tabs from a Ruby script?
body: <p>Based on "<a href="https://stackoverflow.com/questions/435328/open-firefox-browser-with-ruby-automation-script">Open Firefox browser with Ruby automation script</a>", I made a script which would open all of my common internet sites when run, but it only does so if Firefox is already open. If it is not open, it will open one page, on one tab, and then sequentially open the rest, after I close each one. </p>
  
  <p>I tried <code>sleep(5)</code> in case it just wasn't ready, but that didn't work. </p>
  
  <p>My script was:</p>
  
  <pre><code>system("firefox somesite.com/")
  system("firefox another.com/")
  system("firefox aThirdSite.com/")
  </code></pre>
  
  <p>and when I ran it, it loaded all three pages in new tabs if Firefox was already open, but it loaded only the first if Firefox was not open. When I closed Firefox it loaded the second, then, when I closed it again it loaded the third.</p>
  
  <p>Is there a way to open Firefox to each web site in separate tabs, given that Firefox is closed before running the script?</p>