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