@Surya Changing it to 755 is a bad idea, it would work but its not ideal for a production environment. You probably just need to chown the files in question to nginx:nginx or whichever use is running nginx while leaving the files 644.
–
AlfieFeb 10 at 6:37

This error seems caused because the user of nginx cannot access the mentioned file. It can be caused not only if the /root/rails_apps/myapp/public is not have a correct permission, but even if one of the parent directories does not have that!

In your nginx.conf you can see something like:

user nginx;
http {
# blah.
}

Sometimes parameter of the user can be different. Be sure to all folder is available by this user in the path.
You can check it by sudo -Hu nginx /bin/bash -l and cat /root/rails_apps/myapp/public/index.html. Test and test it again with this command until you cannot see the content of the file.

A little explanation: with that sudo command you start a shell as an user nginx. And with cat command you can simulate the file reading.