How many applications, sites, systems in Ruby do you run under Rails and other frameworks? How often do you have to climb into the terminal and run applications through 'rails s' and other console commands? This is a waste of time, complexity in management (in terms of project organization). It would be nice if all the projects were in the same place and started with one click ...
I want to tell you about
Pow . On the one hand, this is a simple Rack server for running your projects, on the other hand, it is a very handy tool. The server is developed by
37signals . The only caveat: the server works only under Mac OSX.
How does a pow work?
Everything is very simple:
- In the terminal, enter the command:
curl get.pow.cx | sh
- After installation, go to the Pow folder:
cd ~/.pow
. This folder is a link to ~/Library/Application Support/Pow/Hosts
. - Make a link to your project:
ln -s /path/to/myapp
- In the browser you type
myapp.dev
Actually the whole installation. Now to add projects it’s enough to link to your projects in the
~/.pow
folder. All projects start with
http://[ ].dev
.
')
The server also has a configuration file
~/.powconfig
, which is located in the home directory. For example, you can specify a timeout of 5 minutes to complete the running project:
export POW_TIMEOUT=300
. More details about server configuration can be found
here .
What are the advantages of Pow?
- No need to edit
/etc/hosts
to run the project through the domain name. - Does not require maintenance. Pow is a simple, stand-alone server that works without root privileges.
- Installation does not require compiling or additional gems.
- full support for rbenv and bundler.
- You can make several links to one project. Thus, subdomains are supported.
- Launching projects with a different set of gems and a version of Ruby.
Is there a graphic tool?
I can not ignore the wonderful program for Pow:
Anvil for Mac . This handy addition allows you to add a new project to Pow in 2 steps.
What can Anvil for Mac?
- Install, Restart, Remove Pow.
- Start, stop the server Pow.
- Adding, updating, deleting links to projects.
I would even recommend to install Anvil for Mac first, and then install Pow from this program.
UPD:
I also want to share additional tools for managing the Pow server.
In addition to the
a_vasyutin Powify mentioned in the commentary,
there is also a gem
Powder . This is a simpler management tool than Powify, but also can install the Pow server, link projects, view logs, etc. For more information on the commands, read here:
https://github.com/Rodreegez/powder#usage .
There is also a web wrapper for Powder -
Powser . It allows you to restart, redirect the project directly through the browser. After installing the gem from the project folder, make a link to the project and launch Power:
powser start appname
Now, for example, to restart the project, it’s enough to enter in the address bar of the browser:
powser.dev/restart
powser.dev/restart
or
powser.dev/restart?app=appname
powser.dev/restart?app=appname
, where appname is any linked project. You can read more about using gem here:
https://github.com/phil-monroe/powser#powder-for-your-browser .
Additional materials