The error was that I had several dockerfiles and one of them didn't have WORKDIR /usr/src/app. So, in that container I saw Rails.root as '/'.