title: Convert all link in HTML to absolute path
body: <p>I have a HTML string, for example,</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;a href="/image/myimage.png"/&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How to convert all relative path into absolute path, like this?</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;a href="http://example.com/image/myimage.png"/&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am using Ruby on Rails, any suitable gem? Or a general way to do it.</p>
  
  <p>Thanks.</p>