how do i change the location of my rails directory?

October 4, 2014 2.7k views

I am using ruby or rails ubuntu 64 droplet with nginx and unicorn.
By default the rails directory is located at" \home\rails".
How can I change this location to "\home\mytestapp" ?

1 Answer

Check out this tutorial for all the info on how the Ruby on Rails one-click application is built and how to deploy your own application on it:

This is covered in more detail there, but the quick answer is that you need to update the references to the demo app in a number of places:

  • /etc/unicorn.conf
  • /etc/default/unicorn
  • /etc/nginx/sites-enabled/rails

Replace mentions of /home/rails/rails_project with the path to your app: \home\rails\mytestapp

by Melissa Anderson
ARCHIVED: DigitalOcean's Ruby on Rails One-click application provides a convenient way to get your Rails application running on an Ubuntu server. With Nginx, Unicorn, and Postgres all pre-installed, the One-click is a great base for hosting your app. In this tutorial, we'll show you how to create a Droplet, where to find the usernames and passwords, and how to restart the key services on the Droplet.
  • The tutorial you've linked to covers none of those 3 at all.

    • While is /etc/nginx/sites-enabled/rails still valid, the droplet uses Puma now. The documentation is wrong though. It lists /etc/systemd/system/rails/service as the config file to edit when it's really /etc/systemd/system/rails.service. It also doesn't mention /etc/nginx/sites-enabled/rails

    • Hi @alotcloser. A lot has changed with the Rails One-Click since I wrote this originally back in 2016! I've passed your feedback about the current docs on to our Marketplace team.

Have another answer? Share your knowledge.