Report this

What is the reason for this report?

Create a new ruby on rails project using MySQL on the one click ruby on rails option

Posted on February 7, 2016

Hello!

I used the ruby on rails one click option to set up an environment. Though I don’t want to use postgres/the original project I want to use MySQL. I installed MySQL and set up a new rails project. I deleted the original projects(/home/rails/rails_project.) but the website stills stays the same(says the project is coming from /home/rails/rails_project/app/views/home/index.html.erb)… These files no longer exist so how is this possible? and how can I point the server to my new project?



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.

You need to restart Unicorn. Until you restart, the old files will still show.

service unicorn restart

As long as you put your new project in /home/rails/rails_project, you don’t need to change anything on the server, assuming you are using the 1-click Rails App image.

It sounds like the issue that your hitting is related to the Nginx configuration on the droplet. In order for Nginx to know about the new location of your Rails app you will need to update the config file located at /etc/nginx/sites-enabled/rails.

Along with updating the Nginx configuration, the Unicorn config file will need to updated as well. The Unicorn config file can be found at ```/etc/unicorn.conf`

Don’t forget to restart the services to load the new configuration.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.