Skip to content

About

Guard::Passenger automatically restarts passenger when needed

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

Guard::Passenger is the useful development server solution. The guard automatically starts Passenger and intelligently restarts the server when needed.

Please be sure to have guard installed before continue.

Install the gem:

gem install guard-passenger

Add it to your Gemfile (inside test group):

gem 'guard-passenger'

Add guard definition to your Guardfile by running this command:

guard init passenger

Please read guard usage doc

Passenger guard can be really be adapted to all kind of rack project with Passenger. Please read guard doc for more info about Guardfile DSL.

guard 'passenger' do
  watch(%|lib/.*\.rb|)
  watch(%|config/.*\.rb|)
end

Passenger standalone is used as default. You can pass options to the guard to disable or configure it. Guard::Passenger will start Passenger on startup and take it down on exit. By default Passenger standalone is activated and port is set to 3000.

You can choose to ping localhost:port(/path) after Passenger has been restarted, it’s done asynchronously so it won’t block other guards execution. If you set :ping to true, it will ping localhost:3000/, it you set :ping to a String, it will append the path to localhost:3000/ for the ping. If the ping responds with a non-5XX response, Passenger is considered as running, otherwise, there is probably a problem with Passenger.

Guard::Passenger accepts some options for configuration.

# :standalone    boolean            run Passenger standalone                (default: true)
# :port          integer            using the given port                    (default: 3000)
# :env           string             framework environment                   (default: development)
# :ping          boolean or string  ping localhost after Passenger restart  (default: false)

guard 'passenger', :standalone => false, :port => 3001, :env => 'production', :ping => '/foo' do
end

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Fabio Kuhn

Contributors Forks

About

Guard::Passenger automatically restarts passenger when needed

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors