JOE and failing rake stats

Habits are second nature, so I’m still using JOE. If You do also don’t be surprised with strange error when running rake stats, like:

$ rake stats
(in /RAILS/APP/PATH)
rake aborted!
No such file or directory - /RAILS/APP/PATH/config/../app/models/.#route.rb

JOE uses special symbolic link in file system to mark files with ongoing changes (this allows JOE to avoid edit file by multiple processes simultaneously). This looks like:

 ll app/models/
total 14
drwxr-xr-x  3 viciu  viciu   512 Oct  5 16:30 ./
lrwxr-xr-x  1 viciu  viciu    16 Oct  5 16:30 .#route.rb@ -> viciu@here.14463
[CUT]

In normal operations links are removed when file is saved, however it can be not true if session with JOE editing file dies unexpectedly (network outage, client crash, etc). This link (which is not pointing to actual file) confuses rake, which tries to read statistics from every file in directories with code.

When faced such strange error verify if there are some broken links in directories.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.