Zed Shaw
2006-Mar-18 21:17 UTC
[Rails] [ANN] Mongrel Console 0.1 -- script/console meets mongrel
This is a super quick announcement for a new Mongrel plugin called mongrel_console. It was inspired by a request from Tobias L?tke who wanted to tail out logs while Mongrel was running. What mongrel_console does is combine the Rails script/console with Mongrel so that you can control a mongrel server while using script/console. Sounds weird but it''s quite awesome for development hacking. You get to start, stop, and reload mongrel and rails while also munging with your AR models and running other Rails code. INSTALL You can install it via: gem install mongrel_console --source=http://mongrel.rubyforge.org/releases/ Then you run it with: $ cd myrailsapp $ mongrel_rails console USAGE You then get an IRB prompt but that you can use like script/console. But, now there''s a bunch of new commands you can use to control Mongrel: * start -- Starts up a Mongrel instance and runs your Rails app in the background. Accepts an option hash. See status to find out what''s available. * stop -- Stops the currently running Mongrel instance. * restart -- Stops then starts using your previous options. If you want to change options then manually start and stop with new options. * status -- Tells you if Mongrel is running and then dumps the options Hash. * trace -- Tells Mongrel to dump all of the request and response headers to log/mongrel.log. Incredibly useful if you think Mongrel is broken for some reason or if you suspect you''ve got a bad header some place. * tail -- Let''s you tail a file out (doesn''t go back to the prompt). By default it tails the log for your environment (log/development.log). Very useful with trace (try tail "log/mongrel.log"). EXAMPLE Here''s me using it during development: Loading development environment. Starting console. Mongrel Commands: start, stop, reload, restart, status, trace, tail irb(main):001:0> start Mongrel running in development mode on 0.0.0.0:3000. => nil irb(main):002:0> trace Tracing mongrel requests and responses to log/mongrel.log => nil irb(main):003:0> tail "log/mongrel.log" Tailing log/mongrel.log. CTRL-C to stop it. .... ^C=> nil irb(main):004:0> reload Reloading rails... Done reloading rails. => nil irb(main):005:0> restart Server stopped. Exiting. Shutdown waiting for 20 requests Mongrel running in development mode on 0.0.0.0:3000. => nil irb(main):006:0> status Mongrel running with: * mime: * docroot: public * server: #<Mongrel::HttpServer:0x253441c> * tracing: true * rails: #<RailsHandler:0x25344d0> * host: 0.0.0.0 * port: 3000 => nil irb(main):007:0> stop Server stopped. Exiting. Shutdown waiting for 20 requests => nil irb(main):008:0> status Mongrel not running. => nil irb(main):009:0> start :port => 4000 Mongrel running in development mode on 0.0.0.0:4000. => nil irb(main):010:0> status Mongrel running with: * mime: * docroot: public * server: #<Mongrel::HttpServer:0x26d4fb0> * tracing: true * rails: #<RailsHandler:0x26d5154> * host: 0.0.0.0 * port: 4000 => nil Win32 people might find the tail command doesn''t work. Enjoy! Let me know what you think. Zed A. Shaw http://www.zedshaw.com/
Robert MannI
2006-Mar-18 22:09 UTC
[Rails] [ANN] Mongrel Console 0.1 -- script/console meets mongrel
Awesome! I love "reload". No need to CTRL-C; <up-arrow-key>; <ENTER>; anymore On 3/18/06, Zed Shaw <zedshaw@zedshaw.com> wrote:> This is a super quick announcement for a new Mongrel plugin called > mongrel_console. It was inspired by a request from Tobias L?tke who wanted > to tail out logs while Mongrel was running. > > What mongrel_console does is combine the Rails script/console with Mongrel > so that you can control a mongrel server while using script/console. Sounds > weird but it''s quite awesome for development hacking. You get to start, > stop, and reload mongrel and rails while also munging with your AR models > and running other Rails code. > > > INSTALL > > You can install it via: > > gem install mongrel_console --source=http://mongrel.rubyforge.org/releases/ > > Then you run it with: > > $ cd myrailsapp > $ mongrel_rails console > > > USAGE > > You then get an IRB prompt but that you can use like script/console. But, > now there''s a bunch of new commands you can use to control Mongrel: > > * start -- Starts up a Mongrel instance and runs your Rails app in the > background. Accepts an option hash. See status to find out what''s > available. > * stop -- Stops the currently running Mongrel instance. > * restart -- Stops then starts using your previous options. If you want to > change options then manually start and stop with new options. > * status -- Tells you if Mongrel is running and then dumps the options Hash. > * trace -- Tells Mongrel to dump all of the request and response headers to > log/mongrel.log. Incredibly useful if you think Mongrel is broken for some > reason or if you suspect you''ve got a bad header some place. > * tail -- Let''s you tail a file out (doesn''t go back to the prompt). By > default it tails the log for your environment (log/development.log). Very > useful with trace (try tail "log/mongrel.log"). > > > EXAMPLE > > Here''s me using it during development: > > Loading development environment. > Starting console. Mongrel Commands: start, stop, reload, restart, status, > trace, tail > irb(main):001:0> start > Mongrel running in development mode on 0.0.0.0:3000. > => nil > irb(main):002:0> trace > Tracing mongrel requests and responses to log/mongrel.log > => nil > irb(main):003:0> tail "log/mongrel.log" > Tailing log/mongrel.log. CTRL-C to stop it. > .... > ^C=> nil > irb(main):004:0> reload > Reloading rails... > Done reloading rails. > => nil > irb(main):005:0> restart > Server stopped. Exiting. > Shutdown waiting for 20 requests > Mongrel running in development mode on 0.0.0.0:3000. > => nil > irb(main):006:0> status > Mongrel running with: > * mime: > * docroot: public > * server: #<Mongrel::HttpServer:0x253441c> > * tracing: true > * rails: #<RailsHandler:0x25344d0> > * host: 0.0.0.0 > * port: 3000 > => nil > irb(main):007:0> stop > Server stopped. Exiting. > Shutdown waiting for 20 requests > => nil > irb(main):008:0> status > Mongrel not running. > => nil > irb(main):009:0> start :port => 4000 > Mongrel running in development mode on 0.0.0.0:4000. > => nil > irb(main):010:0> status > Mongrel running with: > * mime: > * docroot: public > * server: #<Mongrel::HttpServer:0x26d4fb0> > * tracing: true > * rails: #<RailsHandler:0x26d5154> > * host: 0.0.0.0 > * port: 4000 > => nil > > > Win32 people might find the tail command doesn''t work. > > Enjoy! Let me know what you think. > > Zed A. Shaw > http://www.zedshaw.com/ > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Zed Shaw
2006-Mar-18 22:22 UTC
[Rails] [ANN] Mongrel Console 0.1 -- script/console meets mongrel
A couple of little weird bugs people should know about: 1) I made a mistake in the tracing, so uninstall and then reinstall the mongrel_console gem to get a fix. 2) When you run it with the console going it is very sloooowwwwwww. For some weird reason you just need to tail a log and it speeds back up. Have fun. Zed A. Shaw http://www.zedshaw.com/ On 3/18/06 4:17 PM, "Zed Shaw" <zedshaw@zedshaw.com> wrote:> This is a super quick announcement for a new Mongrel plugin called > mongrel_console. It was inspired by a request from Tobias L?tke who wanted > to tail out logs while Mongrel was running. > > What mongrel_console does is combine the Rails script/console with Mongrel > so that you can control a mongrel server while using script/console. Sounds > weird but it''s quite awesome for development hacking. You get to start, > stop, and reload mongrel and rails while also munging with your AR models > and running other Rails code. > > > INSTALL > > You can install it via: > > gem install mongrel_console --source=http://mongrel.rubyforge.org/releases/ > > Then you run it with: > > $ cd myrailsapp > $ mongrel_rails console > > > USAGE > > You then get an IRB prompt but that you can use like script/console. But, > now there''s a bunch of new commands you can use to control Mongrel: > > * start -- Starts up a Mongrel instance and runs your Rails app in the > background. Accepts an option hash. See status to find out what''s > available. > * stop -- Stops the currently running Mongrel instance. > * restart -- Stops then starts using your previous options. If you want to > change options then manually start and stop with new options. > * status -- Tells you if Mongrel is running and then dumps the options Hash. > * trace -- Tells Mongrel to dump all of the request and response headers to > log/mongrel.log. Incredibly useful if you think Mongrel is broken for some > reason or if you suspect you''ve got a bad header some place. > * tail -- Let''s you tail a file out (doesn''t go back to the prompt). By > default it tails the log for your environment (log/development.log). Very > useful with trace (try tail "log/mongrel.log"). > > > EXAMPLE > > Here''s me using it during development: > > Loading development environment. > Starting console. Mongrel Commands: start, stop, reload, restart, status, > trace, tail > irb(main):001:0> start > Mongrel running in development mode on 0.0.0.0:3000. > => nil > irb(main):002:0> trace > Tracing mongrel requests and responses to log/mongrel.log > => nil > irb(main):003:0> tail "log/mongrel.log" > Tailing log/mongrel.log. CTRL-C to stop it. > .... > ^C=> nil > irb(main):004:0> reload > Reloading rails... > Done reloading rails. > => nil > irb(main):005:0> restart > Server stopped. Exiting. > Shutdown waiting for 20 requests > Mongrel running in development mode on 0.0.0.0:3000. > => nil > irb(main):006:0> status > Mongrel running with: > * mime: > * docroot: public > * server: #<Mongrel::HttpServer:0x253441c> > * tracing: true > * rails: #<RailsHandler:0x25344d0> > * host: 0.0.0.0 > * port: 3000 > => nil > irb(main):007:0> stop > Server stopped. Exiting. > Shutdown waiting for 20 requests > => nil > irb(main):008:0> status > Mongrel not running. > => nil > irb(main):009:0> start :port => 4000 > Mongrel running in development mode on 0.0.0.0:4000. > => nil > irb(main):010:0> status > Mongrel running with: > * mime: > * docroot: public > * server: #<Mongrel::HttpServer:0x26d4fb0> > * tracing: true > * rails: #<RailsHandler:0x26d5154> > * host: 0.0.0.0 > * port: 4000 > => nil > > > Win32 people might find the tail command doesn''t work. > > Enjoy! Let me know what you think. > > Zed A. Shaw > http://www.zedshaw.com/ > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Adam Roth
2006-Jun-23 05:01 UTC
[Rails] [ANN] Mongrel Console 0.1 -- script/console meets mongrel
Hey Zed -- root# mongrel_rails console Cannot run the console script: uninitialized constant RailsConfigurator Any idea on that error msg? Thanks On 3/18/06, Zed Shaw <zedshaw@zedshaw.com> wrote:> > A couple of little weird bugs people should know about: > > 1) I made a mistake in the tracing, so uninstall and then reinstall the > mongrel_console gem to get a fix. > 2) When you run it with the console going it is very sloooowwwwwww. For > some weird reason you just need to tail a log and it speeds back up. > > Have fun. > > Zed A. Shaw > http://www.zedshaw.com/ > > > On 3/18/06 4:17 PM, "Zed Shaw" <zedshaw@zedshaw.com> wrote: > > > This is a super quick announcement for a new Mongrel plugin called > > mongrel_console. It was inspired by a request from Tobias L?tke who > wanted > > to tail out logs while Mongrel was running. > > > > What mongrel_console does is combine the Rails script/console with > Mongrel > > so that you can control a mongrel server while using > script/console. Sounds > > weird but it''s quite awesome for development hacking. You get to start, > > stop, and reload mongrel and rails while also munging with your AR > models > > and running other Rails code. > > > > > > INSTALL > > > > You can install it via: > > > > gem install mongrel_console --source> http://mongrel.rubyforge.org/releases/ > > > > Then you run it with: > > > > $ cd myrailsapp > > $ mongrel_rails console > > > > > > USAGE > > > > You then get an IRB prompt but that you can use like > script/console. But, > > now there''s a bunch of new commands you can use to control Mongrel: > > > > * start -- Starts up a Mongrel instance and runs your Rails app in the > > background. Accepts an option hash. See status to find out what''s > > available. > > * stop -- Stops the currently running Mongrel instance. > > * restart -- Stops then starts using your previous options. If you want > to > > change options then manually start and stop with new options. > > * status -- Tells you if Mongrel is running and then dumps the options > Hash. > > * trace -- Tells Mongrel to dump all of the request and response headers > to > > log/mongrel.log. Incredibly useful if you think Mongrel is broken for > some > > reason or if you suspect you''ve got a bad header some place. > > * tail -- Let''s you tail a file out (doesn''t go back to the prompt). By > > default it tails the log for your environment > (log/development.log). Very > > useful with trace (try tail "log/mongrel.log"). > > > > > > EXAMPLE > > > > Here''s me using it during development: > > > > Loading development environment. > > Starting console. Mongrel Commands: start, stop, reload, restart, > status, > > trace, tail > > irb(main):001:0> start > > Mongrel running in development mode on 0.0.0.0:3000. > > => nil > > irb(main):002:0> trace > > Tracing mongrel requests and responses to log/mongrel.log > > => nil > > irb(main):003:0> tail "log/mongrel.log" > > Tailing log/mongrel.log. CTRL-C to stop it. > > .... > > ^C=> nil > > irb(main):004:0> reload > > Reloading rails... > > Done reloading rails. > > => nil > > irb(main):005:0> restart > > Server stopped. Exiting. > > Shutdown waiting for 20 requests > > Mongrel running in development mode on 0.0.0.0:3000. > > => nil > > irb(main):006:0> status > > Mongrel running with: > > * mime: > > * docroot: public > > * server: #<Mongrel::HttpServer:0x253441c> > > * tracing: true > > * rails: #<RailsHandler:0x25344d0> > > * host: 0.0.0.0 > > * port: 3000 > > => nil > > irb(main):007:0> stop > > Server stopped. Exiting. > > Shutdown waiting for 20 requests > > => nil > > irb(main):008:0> status > > Mongrel not running. > > => nil > > irb(main):009:0> start :port => 4000 > > Mongrel running in development mode on 0.0.0.0:4000. > > => nil > > irb(main):010:0> status > > Mongrel running with: > > * mime: > > * docroot: public > > * server: #<Mongrel::HttpServer:0x26d4fb0> > > * tracing: true > > * rails: #<RailsHandler:0x26d5154> > > * host: 0.0.0.0 > > * port: 4000 > > => nil > > > > > > Win32 people might find the tail command doesn''t work. > > > > Enjoy! Let me know what you think. > > > > Zed A. Shaw > > http://www.zedshaw.com/ > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060623/392a16b3/attachment.html
Adam
2006-Jun-23 07:20 UTC
[Rails] Re: [ANN] Mongrel Console 0.1 -- script/console meets mongre
Adam Roth wrote:> Hey Zed -- > > root# mongrel_rails console > Cannot run the console script: uninitialized constant RailsConfigurator > > Any idea on that error msg? > > ThanksIt would be nice for mongrel to have the tailing behavior like script/server does when you run it in non daemon mode. This mongrel console is nice though. -- Posted via http://www.ruby-forum.com/.