Skip to content
This repository

Installation

Bad CPU type in executable error

*** Installing Pow...
*** Installing local configuration files...
/Users/<user>/Library/Application Support/Pow/Current/bin/pow:5:in `exec': Bad CPU type in executable - /Users/<user>/Library/Application Support/Pow/Versions/0.2.2/bin/node (Errno::E086)
    from /Users/<user>/Library/Application Support/Pow/Current/bin/pow:5

The installer includes a node binary only for 64-bit machines. You'll need to install Pow from source.

DNS

Verify the resolver is registered with scutil --dns.

$ scutil --dns
...
resolver #9
  domain : dev
  nameserver[0] : 127.0.0.1
  port    : 20560
  1. If you don't see an entry for dev, try touching the resolver file.

    $ touch /etc/resolver/dev

  2. Also, try turning off and on your computer's AirPort.

  3. Verify that port forwarding is enabled in the system firewall (OS X Mavericks):

    sysctl -w net.inet.ip.fw.enable=1

Setting POW_DOMAIN or POW_DOMAINS isn't working

If you set export POW_DOMAINS=dev,local in your ~/.powconfig, you'll need to rerun the installer to recreate the necessary resolver files.

Can't access hosts while offline on OS X

This is due to a bug in the OS X resolver system.

As a workaround, you can create an Ad-Hoc Wifi Network or add the hosts to your /etc/hosts file (perhaps with powder).

See the discussion about this issue.

Application Not Found even when symlink exists

uninstall pow

rm -rf ~/.pow

install pow

See the discussion about this issue.

Bundler

SystemExit: exit
  ../lib/bundler/setup.rb:10:in `exit'
  ../lib/bundler/setup.rb:10
  ../rubygems/custom_require:58:in `gem_original_require'
  ../rubygems/custom_require:58:in `require'
  config.ru:2

Bundler errors will cause you app to exit with a useless backtrace. Run bundle check and ruby config/environment.rb to get the full trace.

LoadError: no such file to load -- bundler/setup

Is usually means that the wrong version of ruby is being used. See the RVM troubleshooting section.

Bundle exec

  Pow can’t start your application.
  .../project1 raised an exception during boot.
  Gem::LoadError: You have already activated ..., but your Gemfile requires .... Consider using bundle exec.

Your config.ru should start with something like...

  require 'rubygems'
  require 'bundler'
  Bundler.setup

RVM

Incorrect ruby or gemset is being used

Create a .rvmrc at your project root. See rvmrc docs.

This worked for me in rvm 1.18.0 (stable).
In the terminal do this.

rvm use ruby-whatever
cd /my/rails/rack/app/root/
rvm rvmrc create
rvm rvmrc trust

Another possibility is that you upgraded RVM to a newer version that (for some reason unknown to this writer) causes the wrong gems to be picked up. The workaround solution is then to downgrade RVM again with rvm get 1.9.2 or similar. (In this writer's case, 1.11.3 broke and 1.9.2 worked).

System-wide RVM install

If you have a system-wide RVM install and are getting the error LoadError: no such file to load -- bundler/setup, run rvm info to find out where rvm is installed on your machine, then do this:

echo "export POW_RVM_PATH=/usr/local/rvm/scripts/rvm" >> ~/.powconfig

Where /usr/local/rvm/ is the location of your rvm installation.

Then restart POW by killing it in the Activity Monitor or in Terminal.

RVM and zsh

Symptom: LoadError: no such file to load -- bundler/setup
Preconditions: A default Ruby version has been selected using RVM. Your application doesn't have a .rvmrc file.
Solution: Move the line that loads RVM from ~/.zshrc to ~/.zshenv and restart pow by killing the process.
Explanation: .zshrc is only loaded for interactive sessions, so RVM is not available, so Pow uses system Ruby instead of default Ruby.

RVM and Gemfile

If you specify your Ruby version and gemset in a Gemfile (rather than .rvmrc), you'll need to modify your .powrc file like so:

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

rbenv

Symptom: LoadError: no such file to load -- bundler/setup or LoadError: cannot load such file -- bundler/setup

Solution: Add this to your ~/.powconfig

export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"

or if you installed rbenv through Brew and don't have a ~/.rbenv:

export PATH="/usr/local/opt/rbenv/shims:/usr/local/opt/rbenv/bin:$PATH"

Source: https://github.com/37signals/pow/issues/202#issuecomment-2640707

ZSH setup issues

If rbenv can't find the right version (it's using the system ruby by default), drop the following into ~/.powconfig:

export HOME=/Users/[YOUR USERNAME]
export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:/usr/local/bin:$PATH"

Application Errors

Try using a different Rack server to see if the issue is isolated to Pow.

cd path/to/your/app
rackup -p 3000

Verify that rackup boots and is accessible over localhost:3000.

Installing resque (per pow demo)

config.ru: Ensure that the config file has the appropriate requires for bundler/setup and rubygems.

require 'rubygems'
require 'bundler/setup'

Doesn't start, can't connect to host.

There is some issue where it seems Pow won't start correctly when installed in iTerm2 or perhaps in tmux.

The writer only got it working again by installing outside of tmux in Terminal.app.

By "won't start correctly", I mean:

  • curl said "couldn't connect to host"
  • ps aux | grep Pow didn't list it
  • reinstalling in iTerm or tmux in Terminal said

    *** Performing self-test... !!! Couldn't find a running Pow server on port 20559

Something went wrong with that request. Please try again.