Cant update .html.erb file in a Ruby on Rail application - ruby-on-rails

I'm totally new in RubyonRail field:
i tried to update the html in a view file .html.erb, but after uploading the file via ftp, the changes dont take place even if the file has changed.
It seems to be cached, is there something I miss?
D.

you need to be sure and restart the application; how you do so depends on your hosting situation, but try touching /tmp/restart.txt. Passenger-based installs (most low-end hosting fits this description) will restart your app when the mod time on that file changes.

Related

having external files in an electron application

I have an electron app, and when I make it, it packages and compiles everything.
Sounds like it works perfectly right?
Well, problem is I want one of the folders to not be compiled, but still be accessible by my static files, so the users can add or remove content from the folders.
I've tried making it in a seperate folder, but then it can't find the files even when it's placed in the correct relative path.
Overall, I want my app to exist next to a folder and my <script src="./folder/script.js"></script> to actually be able to access it.
I'm new to basically anything node or electron so i'm probably making some dumb mistake.
Thanks in advance.
Having your user touching files close to your Electron application may be fraught with danger. If they accidently overwrite an important file or accidently delete an important file then your application may stop working and require the user to perform a re-install.
Instead, have any default files the user may need to "touch" packaged up with your application and then upon your applications first run, copy these files (and any necessary folder structure) over to the users home, desktop, documents, downloads or even userData directory.
That way, your application will always know where to find them and the directory is a directory your user will already be comfortable adding files to and removing files from.
You can always let the use choose where these files are stored as a settings option which persists in an application setting file, using something similar to path.join(app.getPath('userData'), 'settings.json');
See Electron's app.getPath(name) for more information.

uWSGI trying to load non-existing ini

so I have been trying to add a python app to uwsgi, but it was failing and I decided to redo (and also rename) the application. So I deleted old ini file from /etc/uwsgi/sites-available (lets call it 'example1.ini' and also the application directory from the server ('example1').
Then I uploaded a new directory (lets call it 'example2') and created a new ini file called 'example2.ini'. I also created a symlink.
Now when I try to restart uwsgi, it fails and when I see its status it is trying to load the old ini file (example1.ini) and it causes it to fail. In addition to that, it does not even load the new app.
Is there any way to reload all apps/remove cache/refresh the configurations?
Update: I hope this helps someone. There was no obvious fix so I tried to reboot the whole server (computer) and it helped.

MVC5 Changes on Server not being reflected

Whenever I update one of my views on the server, for example if I have the words "Hello World" printed out and then I go change it to "Hi World" it doesn't reflect.
The old text is still there. The weird part is even if I delete the whole view file the page still loads. I feel that something is being cached but I do not know what or where to look for it. On my local machine it all works, in develop and release mode, but on the server when I push the published version of the code, the changes don't take, any help as to why is most appreciated.
This is on a shared host server
EDIT:
If I take all the files and move them to a temp folder, load the site so it crashes, and then move the files back to original location then the changes kick in.
This is not a browser cache, I ensured by deleting any and all history and even loading it on a new browser.
The files are 100% updated because I updated them directly on the server to ensure its not something to do with publishing.
This is maybe because of this.

How to get a content of file which is being written by an application?

This application always create a file when you activate a function (lets say, a log file). This file cannot be opened during the running - but I need its content before application closes (another process uses it, so I cant even view it). Is there a way to "hook" it somehow?
Im working with Delphi, but I accept any other solution.
So, summary, I need to know what file application created (it always creates other, but in the same directory) and the content it wrote. Any help appreciated.
I found a workaround:
copy the file, and operate on the cloned one:
http://www.howtogeek.com/howto/windows-vista/backupcopy-files-that-are-in-use-or-locked-in-windows/

Replacing Resource files on new BlackBerry app version

I am maintaining an existing BlackBerry application (implemented as a MIDlet). The application contains a number of data files that get bundled with the app as resources. Some of these data files need to be updated for a new version of the app. When the user goes to install a new version of the application (via URL of Jad file), it prompts them with the following message
"Persistent data exists for the application. Would you like to retain this data? "
If the user selects "Yes", it looks like the app continues to use the old resource files.
This is so surprising to me. First of all, am I losing my mind or will an upgrade really not overwrite existing resource files? Is there any way I can force it to?
Thanks,
Jeff
I think that message is only relevant to existing RMS records. Are you positive that your app is still using old resources? That sounds unbelievably strange (even for RIM). Anyway, this should be easy to verify if you change some image resource you're using in one of your screens or something.

Resources