Hi everyone, after going through the simple install, I decided to remove the default rails application in the /home directory and attempted to have unicorn serve one of my own.
I did edit the unicorn.conf file in the /home directory to match the path of my new rails app (/home/blog instead of /home/rails). I also edited the nginx sites-enabled file to reflect the same directory under the root.
After restarting the droplet for good measure and navigating to the IP address of the droplet, I end up at the default nginx error message. I figured this is because unicorn isn’t up. So after entering the command “service unicorn start” I get the error message " * Application directory /home/rails is not exist. Not starting."
So after getting this message and verifying that unicorn is down, I’ll enter “service unicorn restart” which will yield an “OK” message. Entering “service unicorn status” does indeed confirm that it is running.
Now that both nginx and unicorn is running, and the config files are setup as expected, navigating to the droplet IP address will yield a blank page. I’m already weary of this since I had to restart unicorn which wasn’t even started in the first place.
What bothers me is that if I simply just navigate to the root of the rails app (/home/blog) and enter “unicorn” I can then navigate to the droplet’s IP address and have the app served to me without any problems.
Why in the world would the command “service unicorn start” refuse to start? I cannot find anything in /etc/init.d/unicorn that would help me understand. Also, is it okay to just enter “unicorn” in the root of the rails app and call it a day? I haven’t had any luck in finding a solution . If you’ve made it this far, thank you very much for your time!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!