Question

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

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?


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

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.