saiq918
By:
saiq918

Digital Ocean's RoR Image setting up new project correctly?

September 11, 2014 1.3k views

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?

2 comments
  • 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 ?

  • 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!

2 Answers

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!

View the original comment

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 ?

View the original comment

Have another answer? Share your knowledge.