Ruby on Rails cannot access production RDS on AWS
The @'localhost' bit is certainly an issue as you’re connecting to a remote RDS instance, not one located in the same instance as your Rails code.
Instead you can do something like this:
GRANT PROCESS ON llpdn9i88kz3y837.* TO 'n8p1kzg1v9chfcny'@'%';

However, depending on what the Rails code may be doing during the setup phase, you may want to consider granting all privileges:
GRANT ALL ON llpdn9i88kz3y837.* TO 'n8p1kzg1v9chfcny'@'%';

After the system is installed and running, then you can reduce the privileges to just what is needed.