By saiq918
Hello, I’m new to Ruby on Rails. I’ve recently created a droplet using Digital Ocean’s one click Ruby on Rails on Ubuntu 14.04 (Nginx + Unicorn). My goal is create a new RoR project in the home directory and change the root path from the default rails directory to my new directory.
I then created a new project called blog using mysql database.
I modified /etc/nginx/sites-enabled/default and changed root to /home/blog
Next, I modified /etc/default/unicorn and changed APP_ROOT= to /home/blog
Next, I modified /home/unicorn/unicorn.conf working_directory to “/home/blog”
Afterwards, I bundle install blog directory and restarted unicorn and nginx services.
When I go to my website, it redirects to /blog/public/500.html
I followed a steps on some tutorials to created a welcome index page using ‘rails generate controller welcome index’ command and uncommenting ‘root “welcome#index”’ in blog’s routes file.
After I restart unicorn and nginx services, I expect to see a welcome index page, but I still the 500.html page. Where did I go wrong?
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.
This question was answered by @saiq918:
asb, thanks for the advice. I went to the log file and found Mysql2 errors. I forgot to update the database.yml file with the provided mysql login information.
Welcome index page is working now!
This question was answered by @asb:
A 500 error should generate something in the log file that will help track down the problem. Are you seeing anything in
/home/unicorn/log/unicorn.log?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
