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
insert to edit, make some changes, and then
:wq to save.
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.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.