title: Rails: What is the correct usage of Rails.root.join when pointing to "tmp/caching-dev.txt"?
body: <p>I'm setting up a new Rails project and after giving it an initial tidy with Rubocop, I'm left with a single offense.</p>
  
  <p>Rubop complains:</p>
  
  <pre><code>config/environments/development.rb:16:6: C: Please use Rails.root.join('path', 'to') instead.
    if Rails.root.join("tmp/caching-dev.txt").exist?
  </code></pre>
  
  <p>I see that <code>Rails.root</code> returns the path of the current project. So I've tried </p>
  
  <pre><code>if File.join(Rails.root, "tmp/caching-dev.text").exist?
  </code></pre>
  
  <p>instead. But still, Rubocop complains:</p>
  
  <pre><code>config/environments/development.rb:17:6: C: Please use Rails.root.join('path', 'to') instead.
    if File.join(Rails.root, "tmp/caching-dev.text").exist?
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  </code></pre>
  
  <p>What are the <code>path</code> and <code>root</code> arguments meant to be? Surely <code>Rails.root</code> is the path?!</p>