Ask A Question

Notifications

You’re not receiving notifications from this thread.

Deploy Rails guide confusion

Anthony Candaele asked in Rails

Hi,

I'm deploying my Rails app, using this website's Deploy Rails guide.

Something is not really clear, at the end of the guide, under the section 'Adding The Nginx Host' it says:

"Open up /etc/nginx/sites-enabled/default in your text editor and we will replace the file's contents with the following:"

It's not clear to me where to open this file, is it on the VPS or on my local machine. I tried to edit this file on my Digital Ocean VPS, logged in as deploy user, but apparently the file is readonly and I couldn't save my edits.

thanks for your help,

Anthony

Reply

Hey Anthony,

You're right, this is on your VPS. I need to update the tutorial to so it's clear which commands get run on which machine so it's easier to wrap your head around those steps.

You'll need to run the command with sudo so that it is not readonly and you can save your changes.

Using nano sudo nano /etc/nginx/sites-enabled/default
Or with vim if you prefer it sudo vim /etc/nginx/sites-enabled/default

Reply

ok, now I could edit the file.

As I haven't registered a domain name yet, I used 'localhost' for server_name.

Thanks Chris,

Anthony

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.