There’s a lot of content on google about deploying and developing a Ruby On Rails website, I would recommend searching Ruby docs, youtube and google.
Here are a few resources that may answer your question:
Setting up Ruby On Rails Database
Rails – Deplying to DigitalOcean
Writing web applications with Ruby On Rails
this may also help:
how to ask a good question on Stack Overflow
solved Implementing Ruby on website [closed]