2012/9/12 Allan Odgaard <mailinglist@textmate.org>
On Sep 11, 2012, at 10:24 AM, Yvon Thoraval <yvon.thoraval@gmail.com> wrote:

> Here it is : […] Save failed! File exists - (bin/menu.zsh, bin/menu.zsh~)
> […]
> Also, i should mention i had a file "bin/menu.zsh~" BEFORE using rmate, then, removing it before a second rmate gave :
> […]
> Then, rmate is working except another file with the suffix "~" exists too.

I’m a little unclear as to whether or not you solved your problem.

It might be that File::rename does not unlink destination first. Given that you are using rvm and the script is in ruby, I would assume you can test the relevant code on your version of ruby to see why it has a problem.


For me it is clear enough.
I did some test1 :

1 - edit remotely a file "~/bin/menu.zsh" *not* having  "~/bin/menu.zsh~" (~suffix) it is OK.
2 - i duplicate the file to "~/bin/menu.zsh~" by :
$ cp ~/bin/menu.zsh ~/bin/menu.zsh~
and try using rmate :
yt@D620 /home/yt $ rmate -v bin/menu.zsh
Connect: ‘220 imyt.local RMATE TextMate (Darwin 11.4.0)’
yt@D620 /home/yt $ Saving bin/menu.zsh
Save failed! File exists - (bin/menu.zsh, bin/menu.zsh~)
Closed bin/menu.zsh
Done


here it doesn't work...

I look at that point this morning, that is how to solve the "~ prob"...
--
Yvon