How can I check if Pow is running correctly on my Mac? How can I get it running correctly?

2.3k views Asked by At

I'm having difficult seeing my_proj.dev from my browser and I'd just like to check if Pow is up and running correctly, or if the issue lies elsewhere. What is a quick test I can do to see if Pow is installed and running correctly?

  1. launchctl list | grep pow gives the following:

    451 0   cx.pow.powd
    
  2. ps aux | grep pow gives the following:

    jon               451   0.0  0.3  3048228  24300   ??  S    12:38PM   0:00.31 pow
    
  3. curl -H host:pow localhost/status.json gives the following:

    curl: (7) Failed to connect to localhost port 80: Connection refused
    
  4. curl -H host:pow localhost:3000/status.json and curl localhost:3000/status.json give the following:

    curl: (7) Failed to connect to localhost port 80: Connection refused
    

UPDATE:

Rebooting my dev machine apparently fixed everything.

3

There are 3 answers

4
Philip Hallstrom On
curl -H host:pow localhost/status.json

Couple of other endpoints you can hit to pull information out of Pow. See:

http://pow.cx/manual.html#section_3.2

2
tagCincy On

ps aux | grep pow

Should show you at least 2 entries if Pow is running. The one label simply "pow" is the powder process (the other should be from the grep command).

You could always enter touch tmp/restart.txt from the app root. This will reload the app into pow.

I also recommend installing the Powder gem for managing pow on your apps.

0
Chris On

For tmux users, "pow" never installed correctly under tmux. I read about this here: https://github.com/basecamp/pow/wiki/Troubleshooting#doesnt-start-cant-connect-to-host

I ended up uninstalling "pow", by running:

curl get.pow.cx/uninstall.sh | sh

Then in a new Terminal window without "tmux", I installed "pow" again.

curl get.pow.cx | sh

This time installation worked (the post installation "self-test" passed.)

I later on ran into issues with not having a .rvmrc file (I was using .ruby-version and .ruby-gemset, but somehow "pow" wanted a .rvmrc file).

# Change ruby version, gemset, and directory below
cd YOUR_PROJECT_DIRECTORY
echo "rvm ruby-2.2.0@mygemset" >> .rvmrc

Finally, after creating the .rvmrc file, I had to create a .powrc file in the project's directory. This was the contents of the ".powrc"

if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ]; then
    source "$rvm_path/scripts/rvm"
    source ".rvmrc"
fi