Topic: Rails doesn't update rendered page.
I have a view which links to an action in my controller, lets call this controller "pages". Let's call this action, runScript. This action calls a ksh script which executes some commands, takes the output, and puts it in a .txt file which is located inside my view/pages/ folder as output.txt . Then, my runScript.html.erb has:
<pre> <%= render :file => '/path/to/application/app/views/pages/output.txt' %> </pre>
This simply renders the output.txt file onto the page. Now, the problem is that I have a dropdown menu on my index.html.erb which allows me to pick a host and then has a go button which allows me to call the runScript action on that host. However, the first host I run it on, it displays the correct output for that host. After that, for every other host I call the action on, it displays the output from the first host I run it on. Keep in mind, I am overwriting output.txt every time I call this action. I even check output.txt every time I call the action, and the contents of output.txt have been updated, but what's displayed on my rails app stays the same as what is outputted from the first call of the action.
Could this have something to do with overwriting output.txt. Do I need to declare a seperate .txt file for every host? Even though I don't see that being the problem, because output.txt IS updated after every call, it's just the view which still displays the old output.