title: Building Gem - InvalidSpecificationException [...] are not files
body: <p>I'm trying to build my own gem but got that error. I think the cause of this is <strong>because I change the file name</strong> of the <code>gemspec</code>. At first this is my structure:</p>
  
  <pre><code>myapp/
      my-app.gemspec
      documentation.docx
      // other files
  </code></pre>
  
  <p>Then I change the name and move files which become like:</p>
  
  <pre><code>myapp/
      new-name.gemspec
      doc/
          documentation.docx
      // other files
  </code></pre>
  
  <p><strong>Note</strong>: I already changed all the code including the <code>lib</code> to fit the new name</p>
  
  <p>Then, when I run <code>gem build new-name.gemspec</code> I got this error:</p>
  
  <pre><code>ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
      ["my-app.gemspec", "documentation.docx"] are not files
  </code></pre>
  
  <p>It still recognizing my <strong>old structure</strong> instead of the new one.</p>
  
  <p>Any solution?</p>
  
  <p>Thanks</p>