How do I deploy my rails application?
My rails application is running on http://220.127.116.11:3000/ how do I point my
domain to this port? What is the best way to deploy my rails app?
First, I’ve finished pointing my domain name to DigitalOcean by following this tutorial.
Afterward, I setup a new host name in DigitalOcean by following this (https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars) tutorial.
Now, I’m trying to reconfigure my server with between rails, ngnix, and unicorn by following this tutorial which I am running into problems.
I have reconfigured everything according to the tutorial but the problem I am running into now is starting unicorn. I follow the tutorial to the section called “Create Unicorn Init Script” however when I run
sudo service unicorn_appname start,
I get this error
/usr/local/rvm/gems/ruby-2.2.1/gems/unicorn-5.1.0/lib/unicorn/configurator.rb:88:in `block in reload': directory for pid=/home/rails/shared/pids/unicorn.pid not writable (ArgumentError)
I am not sure if this is the tutorial I should follow. Or is there an easier and better way for me to point my domain name to my rails app running in DigitalOcean. Reconfiguring ngnix to take incoming request to port 3000? I really don’t know much about unicorn and ngnix. But I’ll be happy to learn the right way to do this.
Anyways, please help!
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.×