title: Escape spaces in a linux pathname with Ruby gsub
body: <p>I am trying to escape the spaces in a Linux path. However, whenever I try to escape my backslash I end up with a double slash.</p>
  
  <p>Example path:</p>
  
  <pre><code>/mnt/drive/site/usa/1201 East/1201 East Invoice.pdf
  </code></pre>
  
  <p>So that I can use this in Linux I want to escape it as:</p>
  
  <pre><code>/mnt/drive/site/usa/1201\ East/1201\ East\ Invoice.pdf
  </code></pre>
  
  <p>So I'm trying this:</p>
  
  <pre><code>backup_item.gsub("\s", "\\\s")
  </code></pre>
  
  <p>But I get an unexpected output of </p>
  
  <pre><code>/mnt/drive/site/usa/1201\\ East/1201\\ East\\ Invoice.pdf
  </code></pre>