Fix: Rails.root is a Pathname, not a String

Was getting the following error in a Rails context:

```
NoMethodError:
  undefined method `[]' for #<Pathname:/path/to/project/folder>
```