Coder Social home page Coder Social logo

pow's Introduction

                      W
                     R RW        W.
                   RW::::RW    DR::R
        :RRRRRWWWWRt:::::::RRR::::::E        jR
         R.::::::::::::::::::::::::::Ri  jiR:::R
          R:::::::.RERRRRWWRERR,::::::Efi:::::::R             GjRRR Rj
           R::::::.R             R:::::::::::::;G    RRj    WWR    RjRRRRj
           Rt::::WR      RRWR     R::::::::::::::::fWR::R;  WRW    RW    R
       WWWWRR:::EWR     E::W     WRRW:::EWRRR::::::::: RRED WR    RRW   RR
       'R:::::::RRR            RR     DWW   R::::::::RW   LRRR    WR    R
         RL:::::WRR       GRWRR        RR   R::WRiGRWW    RRR    RRR   R
           Ri:::WWD    RWRRRWW   WWR   LR   R W    RR    RRRR    RR    R
  RRRWWWWRE;,:::WW     R:::RW   RR:W   RR   ERE    RR    RRR    RRR    R
   RR:::::::::::RR    tR:::WR   Wf:R   RW    R     R     RRR    RR    R
     WR::::::::tRR    WR::RW   ER.R   RRR       R       RRRR    RR    R
        WE:::::RR     R:::RR   :RW   E RR      RW;     GRRR    RR    R
        R.::::,WR     R:::GRW       E::RR     WiWW     RRWR   LRRWWRR
      WR::::::RRRRWRG::::::RREWDWRj::::RW  ,WR::WR    iRWWWWWRWW    R
    LR:::::::::::::::::::::::::::::::::EWRR::::::RRRDi:::W    RR   R
   R:::::::::::::::::::::::::::::::::::::::::::::::::::tRW   RRRWWWW
 RRRRRRRRRRR::::::::::::::::::::::::::::::::::::,:::DE RRWRWW,
           R::::::::::::: RW::::::::R::::::::::RRWRRR
           R::::::::::WR.  ;R::::;R  RWi:::::ER
           R::::::.RR       Ri:iR       RR:,R
           E::: RE           RW           Y
           ERRR
           G       Knock Out Rails & Rack Apps Like A Superhero.

Pow is a zero-config Rack server for Mac OS X.

Pow Web Site - User's Manual - Annotated Source Code - 2-Minute Screencast


Current Version: 0.6.0

To install or upgrade Pow, open a terminal and run this command:

$ curl get.pow.cx | sh

To set up a Rack app, just symlink it into ~/.pow:

$ cd ~/.pow
$ ln -s /path/to/myapp

That's it! Your app will be up and running at http://myapp.test/. See the user's manual for more information.


© 2017 Sam Stephenson, Basecamp

pow's People

Contributors

aaronvb avatar ayrton avatar bkerley avatar cjolly avatar clowder avatar codykrieger avatar futureimperfect avatar jeremy avatar josh avatar kjg avatar koenpunt avatar ktheory avatar lackac avatar marshally avatar rmm5t avatar sj26 avatar sstephenson avatar sujal avatar tomafro avatar tpope avatar travisjeffery avatar trvsdnn avatar wsclock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pow's Issues

bundled node executable is x86_64 only

There are a few Core Duo OSX systems floating around... It can be hacked around, after the install fails comment out everything between the "Create the Pow directory structure" and "Create the ~/.pow symlink" sections (inclusive), and then copy or symlink a local build of 'node' into ~/Library/Application Support/Versions/Current/bin/ and run the script again.. it all seems to work...

Default umask and permission of ~/Library/LaunchAgents/cx.pow.powd.plist

I've got a default umask of 002 (rather than the standard 022). When ~/Library/LaunchAgents/cx.pow.powd.plist was created, it used my umask, and then wouldn't load because launchctl [apparently] doesn't like a file that's group-writable.

Solution: chmod 644 ~/Library/LaunchAgents/cx.pow.powd.plist after the file is installed.

Support installation via Homebrew

I'd like to support installation via Homebrew. I'm worried it'll introduce a second step to the installation process, though.

Anyone have a good idea where to start?

Support installation from behind a proxy server

I can do the first curl call from the instructions by adding my own proxy flags but there's another curl call in the resulting shell script that doesn't have my proxy settings and therefore causes the installation to fail.

I can get around it by downloading the shell script, modifying the curl call with my proxy flags and then running that but it kind of undermines the whole, nice simple one line installation process.

Ideally the shell script it downloads could somehow inherit my proxy flags from my original call but I doubt something like that would be possible. I think this might be a fairly widespread issue for all us poor souls behind a corporate firewall.

empty POW_DOMAIN gives weird result

On our DNS some names point to 127.0.0.1 because we use them for development. I figured setting POW_DOMAIN to "" would enable me to lauch them with pow, but pow still gobbles the last character.

export POW_DOMAIN=""
http://eat.io
error: "Symlink your application to eat.i first"

no such file to load -- sinatra

I have an old app that is not using bundler which requires sinatra, but pow can't load it.

Sinatra is installed system-wide, so I'm not sure if in order to use pow I have to use bundler?

rvm/zsh trouble

I have RVM but not necessarily an .rvmrc in my application's root. In this situation I couldn't get a Rails app to start, and in the logs would get something like:

[Thu, 07 Apr 2011 20:14:30 GMT] DEBUG nack worker 7374 spawned
[Thu, 07 Apr 2011 20:14:30 GMT] WARNING Could not find activesupport-3.0.3 in any of the sources
[Thu, 07 Apr 2011 20:14:30 GMT] WARNING Try running `bundle install`.
[Thu, 07 Apr 2011 20:14:30 GMT] DEBUG nack worker exited

By creating an .rvmrc file, even if empty, everything was fine.

unable to load bundled gems from github

Any gems referred to in your Rails Gemfile that are located using git://<gitpath> will prevent your app from loading via Pow. bundle install run in app directory succeeds without errors.

Bundler::GitError: git://<gitpath> is not checked out. Please run bundle install

Application won't start (YAML parse error?)

Here's a weird one for you.

The application starts fine using rails server (1.9 on a gemset, using .rvmrc)

Using pow, however (with /Users/bruce/Development/myproduct/web symlinked to /Users/bruce/.pow/myproduct):

/Users/bruce/Development/myproduct/web raised an exception during boot.
ArgumentError: syntax error on line 2, col 13: `'
/Users/bruce/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:135:in `load'
/Users/bruce/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:135:in `load'
/Users/bruce/.rvm/lib/rvm/shell/abstract_wrapper.rb:139:in `raw_stdout_to_parts'
/Users/bruce/.rvm/lib/rvm/shell/single_shot_wrapper.rb:21:in `block in run_command'
/Users/bruce/.rvm/lib/rvm/shell/single_shot_wrapper.rb:44:in `with_shell_instance'
/Users/bruce/.rvm/lib/rvm/shell/single_shot_wrapper.rb:17:in `run_command'
/Users/bruce/.rvm/lib/rvm/shell/abstract_wrapper.rb:71:in `run'
/Users/bruce/.rvm/lib/rvm/environment/utility.rb:61:in `rvm'
/Users/bruce/.rvm/lib/rvm/environment/tools.rb:11:in `tools_path_identifier'
/Users/bruce/.rvm/lib/rvm/environment/tools.rb:53:in `path_identifier'
/Users/bruce/.rvm/lib/rvm/environment/rubies.rb:40:in `use_from_path!'
/Users/bruce/.rvm/lib/rvm.rb:148:in `method_missing'
/Users/bruce/Development/myproduct/web/config/initializers/setup_load_paths.rb:7:in `'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `load'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `block in load'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `load'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/engine.rb:201:in `block (2 levels) in '
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/engine.rb:200:in `each'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/engine.rb:200:in `block in '
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `instance_exec'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `run'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/initializable.rb:50:in `block in run_initializers'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `each'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `run_initializers'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/application.rb:134:in `initialize!'
/Users/bruce/.rvm/gems/ruby-1.9.2-p0@myproduct/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
/Users/bruce/Development/myproduct/web/config/environment.rb:5:in `'
:29:in `require'
:29:in `require'
/Users/bruce/Development/myproduct/web/config.ru:3:in `block in '
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
/Users/bruce/Development/myproduct/web/config.ru:1:in `new'
/Users/bruce/Development/myproduct/web/config.ru:1:in `'
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/server.rb:50:in `eval'
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/server.rb:50:in `load_config'
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/server.rb:43:in `initialize'
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/server.rb:13:in `new'
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/server.rb:13:in `run'
/Users/bruce/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/bin/nack_worker:4:in `'

Happy to provide any and all information that can help unravel this mystery.

ipfw rule breaks “Web Sharing” in Mac OS X

Prior to installing Pow, I had Web Sharing enabled in OS X to be able to serve static content from ~/Sites.

Now that Pow is installed, going to the address from the Sharing preference pane in Mac OS X (in my case that's http://192.168.50.103/~vladimir/) results in a “Pow: No Such Application” error page with the following message:

Symlink your application to 192.168.50 first.

This is unexpected to me because the URL I am attempting to visit is not a domain on .dev, which the resolver is set up for, yet Pow still tries to handle it. I understand that it is because all packets to a local IP, port 80 are redirected to Pow, but it seems confusing and breaks the ability to have static sites in ~/Sites.

Note: httpd was running (since Web Sharing was enabled) when I installed Pow, but the redirect rule did not take effect until after I restarted httpd (by disabling and then re-enabling Web Sharing). Before I restarted httpd requests kept going to it even after Pow was installed and the rule dropped into /Library/LaunchDaemons/cx.pow.firewall.plist.

lazy resolving of underscored project names

It would be nice to not have to type underscores in the domain if the project name has them. For example myappname.dev should resolve to the my_app_name project.

Any suggestions on how this could be accomplished? I'm new to a lot of this but really interested in learning.

I followed the instructions but it half-installed

I ran the command but no pow server starts (unless I am doing something wrong), and I can't see any of the paths from the documentation having arrived on the system anywhere (again unless I'm wrong). Any ideas?

curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2722  100  2722    0     0   8754      0 --:--:-- --:--:-- --:--:-- 12900
*** Installing Pow 0.2.2...
*** Installing local configuration files...
/Users/stef/Library/LaunchAgents/cx.pow.powd.plist
*** Installing system configuration files as root...
Password:
/etc/resolver/dev
/Library/LaunchDaemons/cx.pow.firewall.plist
*** Starting the Pow server...
*** Installed
stef:~/.pow$ ln -s /files/apps/buddy
stef:~/.pow$ ls
buddy
stef:~/.pow$ ps -Alf | grep pow
  501 93026 84625     4006   0  31  0  2435036    532 -      S+   155b5d20 ttys003    0:00.00 grep pow           0:00.00
stef:~/.pow$ tail ~/Library/Logs/Pow
tail: /Users/stef/Library/Logs/Pow: No such file or directory
stef:~/.pow$ ls "~/Library/Application Support/Pow/Current"
ls: ~/Library/Application Support/Pow/Current: No such file or directory
stef:~/.pow$ ls  "~/Library/Application Support/Pow/Versions"
ls: ~/Library/Application Support/Pow/Versions: No such file or directory

Refuses to load on startup initially

I had no trouble getting Pow working on my MacBook Air, but for some unfathomable reason, it didn't work out of the box on my MacBook Pro.

I'm not sure what the cause of this was, but launchctl just refused to load ~/Library/LaunchAgents/cx.pow.powd.plist. I tried removing, reinstalling, repairing disk permissions, chmod'ing the plist to 644, etc. Even if I tried loading it manually with:

launchctl load ~/Library/LaunchAgents/cx.pow.powd.plist

# output:
nothing found to load

Only after I did this did it work:

launchctl load -Fw ~/Library/LaunchAgents/cx.pow.powd.plist

Now it seems to launch on system startup, and without the "-Fw". Any idea what could cause this? Is it maybe worth adding -Fw to the install script when it launches Pow for the first time?

Thanks, Pow is awesome.
Cody

Apache virtual hosts don't work after installing pow

Hi there,

I have been running virtual hosts on my Mac for developing PHP sites. I have installed Pow and now my previous virtual host sites display a message "This domain isn’t set up yet. Symlink your application to local.mydomain.c first."

Is this something to do with the ports that they're not able to run together?

Thanks.

How to install Pow from scratch

first off... awesome work 37Signals, this is really COOL! I just wanted to get this up ASAP, so I did not dig into issues, just quickly read some of the issues folks ran into, and I had already intended to manually install V8, Node, Redis as I'm working thru learning the technologies... ok so I have not double checked my steps. but they should give folks an idea of what needs to be done if they are unsure about what is going on underneath the installation

Uninstalled Ports

http://guide.macports.org/chunked/installing.macports.uninstalling.html

Install Homebrew

https://github.com/mxcl/homebrew/wiki/installation

Install V8

brew install scons
mkdir ~/javascript
cd ~/javascript
svn checkout http://v8.googlecode.com/svn/trunk/ v8
cd ~/javascript/v8
scons sample=shell
sudo ln -s ~/javascript/v8/shell /usr/local/bin/v8
cd ~/javascript/v8
svn update
scons sample=shell

Install node

I was was going to get the sources and compile, and then thought brew...
brew install node

Install redis

curl -O http://redis.googlecode.com/files/redis-2.2.4.tar.gz
tar xzf redis-2.2.4.tar.gz
cd redis-2.2.4
make
sudo cp src/redis-server /usr/local/bin
sudo cp src/redis-cli /usr/local/bin

Install npm

git clone git://github.com/isaacs/npm.git
cd npm
sudo make install
# node cli.js install -g -f
# /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm.js
# [email protected] /usr/local/lib/node_modules/npm

Uninstall RVM and Install new as update is broken

mv .rvm{,.1}
bash < <(curl -B http://rvm.beginrescueend.com/install/rvm)
rvm --version
# rvm 1.5.3
rvm install 1.9.2
rvm --default 1.9.2
which ruby
gem install rails3
gem install sinatra
gem install sqlite3
gem install json
gem install redis
gem install nokogiri

Install Pow

curl get.pow.cx/uninstall.sh > pow.sh
edit pow.sh and comment out these 2 lines
# launchctl unload "$HOME/Library/LaunchAgents/cx.pow.powd.plist" 
# launchctl load "$HOME/Library/LaunchAgents/cx.pow.powd.plist" 
./pow.sh

Git clone resque

cd Workspaces
git clone https://github.com/defunkt/resque.git
cd resque
edit .rvmrc
rvm 1.9.2
bundle install
cd .pow
ln -s /Users/kramerica/Workspaces/resque
cd resque
vi .rvmrc
rvm 1.9.2
cd ~/.pow/resque
reply 'y' to trust
bundle install

Check DNS

edit /etc/resolver/dev ==> add newline after last entry
scutil --dns
    resolver #9
        domain : dev
        nameserver[0] : 127.0.0.1
        port    : 20560

Fix pow script to use rvm ruby

edit ~/Library/Application\ Support/Pow/Current/bin/pow
#!/usr/bin/ruby ==> #!/usr/bin/env ruby

Start up Redis

sudo redis-server

Startup Pow

launchctl unload "$HOME/Library/LaunchAgents/cx.pow.powd.plist" 
launchctl load "$HOME/Library/LaunchAgents/cx.pow.powd.plist" 

Bring up Resque in browser

open http://resque.dev

send_file from rails hangs indefinitely

When using send_file from rails (3.0.5 and 3.0.6 confirmed) the files never finish sending.

Here's a transcript to reproduce:

# gem install rails sqlite3
rails new send_file_bug
cd send_file_bug
cat > app/controllers/bug_controller.rb
class BugController < ApplicationController
  def index
    send_file Rails.root + "public/images/rails.png", :type => "image/png", :disposition => "inline"
  end
end
^D
cat > config/routes.rb
SendFileBug::Application.routes.draw do
  match ':controller(/:action(/:id(.:format)))'
end
^D
cd ~/.pow
ln -s $OLDPWD
curl -O -v http://send_file_bug.dev/bug

If you load the URL in your browser, you'll see that it does send the image, but the request never completes.

Homebrew Formula

Is it possible to create a homebrew formula?

It will be easier to just type:
brew install pow

rvm gemsets not working as expected

I use gemsets extensively to work on multiple projects on the same dev machine. I'm finding that any projects that use gems that are not in the global gemset are failing to launch with missing gem errors (bundler is complaining).

Getting OS X equiv of blue-screen of death when using Pow over VPN

Pow works great when I'm not on VPN, but after about 30 secs of having my Cisco VPN turned on, OS X takes a dump. I tried to find some logs inside of Console, but can't get anything that's worth posting here. I suspect the issue is with Pow's DNS server clashing with Cisco VPNs'. Anyone else able to test this out?

Don't require config.ru for serving static sites

Right now it's possible to serve static sites with Pow, but only if you have a config.ru like this:
run lambda { [404, {"Content-Type" => "text/plain"}, ["Not Found"]] }

It'd be nice to eliminate that requirement.

TypeError: Object ... has no method 'split'

Hi

I'm trying to run a Rails 2.3.10 app and I get the erro below. Meanwhile I'm trying to write a failing test case, but I'm still figuring out how to use cake.

Meanwhile, I edit the lines 257-261 on nack/lib/client.js from:

        for (k in rawHeaders) {
          vs = rawHeaders[k];
          v = vs.split("\n");
          this.headers[k] = v.length > 0 ? v.join("\r\n" + k + ": ") : vs;
        }

to

        for (k in rawHeaders) {
          vs = rawHeaders[k];
          this.headers[k] = vs;
        }

and I could run the app.

The error is this:

TypeError: Object _loja_session=BAh7BzoTdXNlci5yZXR1cm5fdG8iCy9hZG1pbjoPc2Vzc2lvbl9pZCIlNzI2OThmZmU0M2FlYmYzOGIzZGZjN2U3MDBjMzNjMTk%3D--3a112c99fb073ac3889376db7612d608af144918; path=/; HttpOnly has no method 'split'
TypeError: Object _loja_session=BAh7BzoTdXNlci5yZXR1cm5fdG8iCy9hZG1pbjoPc2Vzc2lvbl9pZCIlNzI2OThmZmU0M2FlYmYzOGIzZGZjN2U3MDBjMzNjMTk%3D--3a112c99fb073ac3889376db7612d608af144918; path=/; HttpOnly has no method 'split'
at ClientResponse._receiveData (/Users/marcus/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/client.js:259:22)
at [object Object].<anonymous> (/Users/marcus/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/client.js:46:33)
at [object Object].emit (events.js:64:17)
at Client.<anonymous> (/Users/marcus/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/node_modules/netstring/lib/ns.js:206:26)
at Client.emit (events.js:64:17)
at Client._onReadable (net.js:672:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)

Domain aliasing

This may be possible to do in resolver i don't know, when dealing with things such as Facebook connect you need to use a real domain or sub domain or Facebook won't give you the oauth tokens, what i usually do is pop dev.foo.com in my hosts file and then it will pass me the cookie, is there anyway i can alias foo.com to foo.dev?

Capture and display stdout/stderr when a process fails to boot

Browser output:

/Users/michaelguterl/code/rm/board raised an exception during boot.
Error: unknown process error
Error: unknown process error
at Process. (/Users/michaelguterl/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/process.js:115:39)
at Socket. (/Users/michaelguterl/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/process.js:3:63)
at Socket.emit (events.js:64:17)
at Socket._onReadable (net.js:672:14)
at IOWatcher.onReadable as callback

Log output:

[Fri, 08 Apr 2011 00:18:24 GMT] DEBUG nack worker 505 spawned
[Fri, 08 Apr 2011 00:18:38 GMT] DEBUG nack worker exited
[Fri, 08 Apr 2011 00:18:51 GMT] DEBUG nack worker 625 spawned
[Fri, 08 Apr 2011 00:19:04 GMT] DEBUG nack worker exited

Any ideas?

Install fails with "Permission Denied"

 Machine:~ bonaldi$ curl get.pow.cx | sh
[dload snipped]
*** Installing Pow 0.2.2...
*** Installing local configuration files...

/Users/bonaldi/Library/Application Support/Pow/Versions/0.2.2/lib/command.js:50
        throw err;
        ^
Error: EACCES, Permission denied '/Users/bonaldi/Library/LaunchAgents/cx.pow.powd.plist'
Machine:~ bonaldi$ 

Symlink to hostname mapping should be case-insensitive

I had a folder MyApp on my desktop and created a symlink of the folder in the .pow directory like this: ln -s /Users/errorhandler/Desktop/MyApp when I went to http://MyApp.dev I got Symlink your application to myapp first. message but when I changed the MyApp folder to myapp and removed the symlink and did the symlink again it worked, so it would seem that Pow doesn't look for symlinks starting with capitals

Compatibility with Ruby 1.9 installed as /usr/bin/ruby

In order for the application to work with Ruby 1.9.2, I had to make a few changes to bin/pow:

#!/usr/bin/ruby
require 'pathname'
ENV['POW_BIN'] = (bin = Pathname.new(__FILE__).realpath).to_s
root = bin.dirname.parent
exec root.join("bin/node").to_s, root.join("lib/command.js").to_s, *ARGV

Otherwise you get:

*** Installing Pow 0.2.2...
*** Installing local configuration files...
/Users/eric/Library/Application Support/Pow/Current/bin/pow:3:in `[]=': can't convert Pathname into String (TypeError)
from /Users/eric/Library/Application Support/Pow/Current/bin/pow:3:in `<main>'

After adding the manual string conversion I was able to finish installation and get a first app up and running without issue.

npm install --dev fails

Just cloned and tried to npm install --dev, but things blow up.

Output log is here: https://gist.github.com/908729

Can't tell if it's something on my end or if there's a dep issue, but thought I'd bring it up and see. Looks like it's expecting a coffee-script dir in the node_modules dir but not finding it?

Uninstall doesn't work under iTerm

If I run the uninstall script (curl get.pow.cx/uninstall.sh | sh) under iTerm, I get the following error message:

sh: line 45: /dev/s000: No such file or directory

If I run the same command under the terminal, everything works fine.

Can't follow along w/ Screencast (no such file sinatra/base)

I'm trying to follow along with the screencast, but it won't boot resque because it claims it can't find the sinatra/base file:

/Users/estrathmeyer/Desktop/resque raised an exception during boot.

LoadError: no such file to load -- sinatra/base
/Users/estrathmeyer/Desktop/resque/lib/resque/server.rb:1:in `require'
/Users/estrathmeyer/Desktop/resque/lib/resque/server.rb:1
/Users/estrathmeyer/Desktop/resque/config.ru:5:in `require'
/Users/estrathmeyer/Desktop/resque/config.ru:5
/Users/estrathmeyer/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
/Users/estrathmeyer/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
/Users/estrathmeyer/Desktop/resque/config.ru:1:in `new'
/Users/estrathmeyer/Desktop/resque/config.ru:1

And yet sinatra is installed in the bundle:

Eric-Strathmeyers-iMac:resque estrathmeyer$ bundle install
Using json (1.4.6) 
Using rack (1.2.2) 
Using rack-test (0.5.7) 
Using redis (2.2.0) 
Using redis-namespace (0.10.0) 
Using tilt (1.2.2) 
Using sinatra (1.2.1) 
Using vegas (0.1.8) 
Using resque (1.15.0) from source at . 
Using bundler (1.0.11) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Eric-Strathmeyers-iMac:resque estrathmeyer$ bundle console
WARNING: using the built-in Timeout class which is known to have issues when used for opening connections. Install the SystemTimer gem if you want to make sure the Redis client will not hang.
>> require 'sinatra/base'
=> true

Any ideas?

Allow Environment Setting Per Symlink Host

I have an app that runs "n" number of instances. Each vhost in apache was set to use the same application directory and used "SetEnv foo bar" in each host to configure the app instance. Is this possible with pow using either the .powrc or .powenv files?

I have read thru the source code and do not see anything that would be available to me in these files that would allow me to know which worker/process I am firing up. My ~/.pow directory would be like this.

$ ls ~/.pow
foo.myapp -> /Users/kencollins/Repositories/myapp
bar.myapp -> /Users/kencollins/Repositories/myapp

Yes, it could be argued that my app should do this at the app level, but this ENV setting I need per host is a boot strap variable per app instance. Ideas?

Failing test_http_server test

I haven't had time to debug this yet. Are you getting the same failure?

test_http_server

undefined:1

^^
SyntaxError: Unexpected token ILLEGAL
    at Object.parse (native)
    at /Volumes/GitHub/pow/test/test_http_server.coffee:46:43
    at IncomingMessage.<anonymous> (/Volumes/GitHub/pow/test/lib/test_helper.coffee:86:18)
    at IncomingMessage.emit (events.js:81:20)
    at HTTPParser.onMessageComplete (http.js:132:23)
    at Client.onData [as ondata] (http.js:1470:27)
    at Client._onReadable (net.js:677:27)
    at IOWatcher.onReadable [as callback] (net.js:177:10)

Support .rvmrc

You can manually activate a Ruby version via rvm in .powrc:

source $HOME/.rvm/scripts/rvm
rvm use 1.9.2

But we should support .rvmrc files.

.dev resolver doesn't "register" properly

Editor's note: A few people have been unable to access .dev domains after installing Pow. It seems that in some cases the system doesn't immediately detect Pow's installation of a file in /etc/resolver. A temporary workaround is to open and save the /etc/resolver/dev file. The original message follows.
 

After Installing Pow I wasn't able to get an .dev domains to point to the pow server. I ran scutil --dns to see if the .dev resolver was being used at all, and it wasn't.

Opening /etc/resolver/dev and saving it again fixed this. Not sure why it was happening in the first place.

Segmentation fault for native gems

This happens with all native gems including nokogiri and sqlite3:

[Fri, 08 Apr 2011 09:01:09 GMT] DEBUG nack worker 299 spawned
[Fri, 08 Apr 2011 09:01:16 GMT] WARNING /Users/oscardelben/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-1.3.3/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
[Fri, 08 Apr 2011 09:01:16 GMT] WARNING ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.1]
[Fri, 08 Apr 2011 09:01:16 GMT] WARNING
[Fri, 08 Apr 2011 09:01:18 GMT] DEBUG nack worker exited

I have no problems starting these applications manually with rails server.

Pow is not taking .rvmrc under account

In a small project of mine using a .rvmrc to switch to ruby1.9.2, Pow fails to make the switch

➜ pwd
/Users/jblanche/.pow

➜ ruby --version                                                                          
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

➜ cd barthuspreview 

➜ cat .rvmrc 
rvm 1.9.2@barthuspreview

➜ ruby --version   
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.7.0]

➜ rackup
[2011-04-07 23:59:45] INFO  WEBrick 1.3.1
[2011-04-07 23:59:45] INFO  ruby 1.9.2 (2010-08-18) [x86_64-darwin10.7.0]
[2011-04-07 23:59:45] INFO  WEBrick::HTTPServer#start: pid=22468 port=9292
^C[2011-04-07 23:59:48] INFO  going to shutdown ...
[2011-04-07 23:59:48] INFO  WEBrick::HTTPServer#start done.

➜ telnet barthuspreview.dev 20559                                                         
Trying 127.0.0.1...
Connected to barthuspreview.dev.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Connection: close

TypeError: Cannot read property 'root' of undefined
    at HttpServer.<anonymous> (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/lib/http_server.js:124:19)
    at /Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/lib/http_server.js:3:63
    at Object.handle (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/lib/http_server.js:27:16)
    at next (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/connect/lib/http.js:199:17)
    at next (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/connect/lib/http.js:201:11)
    at next (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/connect/lib/http.js:201:11)
    at next (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/connect/lib/http.js:201:11)
    at next (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/connect/lib/http.js:201:11)
    at next (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/connect/lib/http.js:213:9)
    at HttpServer.<anonymous> (/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/lib/http_server.js:56:14)Connection closed by foreign host.

➜ curl barthuspreview.dev
<!doctype html>
<html>
<head>
  <title>Pow: Error Starting Application</title>
  <style>
    body {
      margin: 0;
      padding: 0;
    }
    h1, h2, pre {
      margin: 0;
      padding: 15px 30px;
    }
    h1, h2 {
      font-family: Helvetica, sans-serif;
    }
    h1 {
      font-size: 36px;
      background: #eeedea;
      color: #c00;
      border-bottom: 1px solid #999090;
    }
    h2 {
      font-size: 18px;
      font-weight: normal;
    }
  </style>
</head>
<body>
  <h1>Pow can&rsquo;t start your application.</h1>
  <h2><code>/Users/jblanche/dev/barthus-preview</code> raised an exception during boot.</h2>
  <pre><strong>LoadError: no such file to load -- compass</strong>
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Users/jblanche/dev/barthus-preview/Myapp.rb:1
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Users/jblanche/dev/barthus-preview/config.ru:2
/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
/Users/jblanche/Library/Application Support/Pow/Versions/0.2.2/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
/Users/jblanche/dev/barthus-preview/config.ru:1:in `new'
/Users/jblanche/dev/barthus-preview/config.ru:1</pre>
</body>
</html>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.