-3

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:

/var/www/apps/myapp/current/app/views/users/sessions/new.html.erb
/var/www/apps/myapp/releases/20130521103701/app/views/users/sessions/new.html.erb
/var/www/apps/myapp/releases/20130521105000/app/views/users/sessions/new.html.erb

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

CHarris
  • 101
  • 2

1 Answers1

1

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.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Hi Michael, several hours later I went back to the site and my changes were reflected ok. I didn't change any production mode stuff - it's like there was a delay or something. Thanks for your help anyway. – CHarris May 30 '13 at 11:54