13

Zeus is a great tool when working on a fairly large Rails projects to lower the load time of Rails application and running the test suite. However after sometime I have started to face this problem with all my projects on starting zeus:

enter image description here

I did some research and also tried some of resources to resolve this error but none of them worked. I would be thankful if somebody can point me to the right direction to resolve this issue.

I am on a Mac OSX 10.8.2

Thanks

simont
  • 68,704
  • 18
  • 117
  • 136
Smoke
  • 1,052
  • 1
  • 10
  • 24
  • 5
    Did you try `rm .zeus.sock` like it suggests? I get that error whenever I try to start zeus and there's already a `.zeus.sock` file in the directory (for example, if Zeus crashed without cleaning itself up). – Gabe Durazo Jul 13 '13 at 14:11
  • Check what files are in the [root of your rails project](https://github.com/burke/zeus/issues/287#issuecomment-15401345): `ls -a`. If there is a `.zeus.sock`, remove it. [This is not a `zsh` issue, so I'm removing the tag]. – simont Jul 13 '13 at 16:31

5 Answers5

25

The two comments actually pointed me to the right direction:

If ls-a shows .zeus.sock file than doing a simple remove resolves the issue like this :

rm .zeus.sock
Smoke
  • 1,052
  • 1
  • 10
  • 24
  • 2
    What if you have never run zeus, and there is no .zeus.sock file anywhere on your system? – RedMage Feb 26 '14 at 21:24
  • @RedMage that should never be the case, but you can also check if the process is running. If you try to start the process and it fails it still generates a zeus.sock file which you can see with ls -la – Josh Bedo Mar 13 '14 at 18:45
  • 2
    @RedMage What you describe can happen when using a Parallels VM and access your project via Parallels Shared Folders. The solution I've found is to clone/copy the project on the VM. – duma Dec 31 '14 at 18:20
  • Thanks @duma, that was helpful. I am getting the same behavior RedMage described, and my project folder is in fact a shared folder, but in VirtualBox instead of Parallels. Can you link to the SO question or other article where you learned this? Or was it just through first hand experimentation? – maurice Jun 02 '15 at 21:18
  • The file is present in the same directory as `zeus.json`. Most probably in the root of the project directory. – Saurabh Thakur May 13 '21 at 14:23
3

This is solved, but still is very high in google for that particular error, so in hopes of helping someone:

The error can also happen if you're trying to run zeus from a shared directory - for example inside vagrant environment. Use the ZEUSSOCK environment variable to move the sock somewhere else (like /tmp).

See this.

Barnaba
  • 657
  • 5
  • 19
2

It's also possible you're in the wrong directory or a directory without a Rails app in it :)

BF4
  • 1,076
  • 7
  • 23
1

I solved this with these commands:

ls -al

and found out that it is in my Rails project enter image description here

You can delete .zeus.sock by typing

rm .zeus.sock
AllenC
  • 2,754
  • 1
  • 41
  • 74
0

There can be multiple things happening here:

  1. You are not in the root directory of the rails app or in the same directory as zeus.json.

  2. Zeus daemon is already running in some other shell.

  3. .zeus.sock file wasn't deleted since the last run. This file is present in the root of the rails app directory. You can go ahead and delete this file and then run zeus start.

Saurabh Thakur
  • 139
  • 3
  • 4