Reputation: 13223
I'm facing a really strange problem. When I start rails s
, Rails logs as expected to log/development.log file.
As soon as I open it in an editor (e.g. Vi, TextMate) and save it from there, Rails doesn't write to it anymore! I have to restart the server, and then it works again.
This is really strange, it seems like Vi/TextMate "steals" the right to write the file, and only a restart of the Rails server regains the right again.
Anybody has an idea what's happening here? This is really annoying. I'm also only able to do rake log:clear
as long as I didn't hit "save" for development.log, so it's exactly the same strange behavior...
I described a similar strange behavior like this before, and I suspected AckMate to have something to do with it. Sadly, I didn't get any response, see here.
Thanks a lot for help, this is really bugging me.
Upvotes: 0
Views: 287
Reputation: 2635
vim
writes your file to a temporary file and then renames it.
The Rails process keeps writing to the old opened fd.
Upvotes: 1