By stepolee
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!
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.
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.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.