editing files on remote server with Vi not recognised when I refresh my browser

CHarris asked:

My server is running on Apache Linux. I’m very new to this area. Is there a default folder where the website files are stored? I mean I thought I had it – the first one in the list below, but it doesn’t seem to be.

I’ve been editing what I thought were the html (in fact Rails erb) files on the website, with the vi Command in Terminal, but the changes aren’t reflected when I save them and refresh my browser, even though I clear my cache.

I’ve found the same file in three different places and have made the same edit to all of them. The locations are:


And to be clear in Terminal I use vi new.html.erb.
Then insert to edit, make some changes, and then :wq to save.

My answer:

You are probably running your Rails server in production mode. In this mode, most Rails servers do caching, which prevents your changes from being read.

If this is the actual production website and you’ve just cap deployed a new version of the app, you’d signal or restart the Rails server.

If this is for development, run the Rails server in development mode instead. In this mode, caching is off and files will always be read from the disk on each request.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.