Project

startbrick

0.0
No commit activity in last 3 years
No release in over 3 years
rails s wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Startbrick

How much of your Rails dev time is wasted waiting for this:

$ rails s
=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server

to turn into this:

$ rails s
=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-11-01 13:22:01] INFO  WEBrick 1.3.1
[2011-11-01 13:22:01] INFO  ruby 1.9.2 (2011-07-09) [i686-linux]
[2011-11-01 13:22:01] INFO  WEBrick::HTTPServer#start: pid=4012 port=3000

just so you can manually load the Rails app in your web browser?

Startbrick is a thin wrapper around the rails s command that automatically opens your Rails app in your default web browser when it's ready to accept requests.

Install the gem with

gem install startbrick

Startbrick works with Rails 3. It doesn't work with JRuby because it uses Kernel#fork.

Start your Rails app with this command:

startbrick

The browser should open to your app once the server is ready to accept requests.

You can add any of the arguments that you can pass to the rails s command.

Optional .startbrick script

By default, Startbrick runs this shell command when the Rails server is ready for requests:

open "http://#{Host}:#{Port}"

You can override this by putting your own commands in a shell script in a .startbrick file in your Rails root directory.