These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
DigitalOcean provides VPS, which means you have full root access to the server, so you can do whatever you want including of course installing Rails 4.
<br>Depending of the OS you choose for your droplet, installation procedure might be different tough.