Skip to content

Bandshell Development

Mike edited this page Dec 6, 2015 · 5 revisions

This page details a few different ways to get a development copy of Bandshell up and running. Choose the method that best fits your development goals.

Packaging the latest code

To cut your own bandshell gem off the latest MASTER code or your own branch, follow these instructions.

  1. Open a terminal in the root directory of your local bandshell working copy
  2. Build the Bandshell gem with "gem build bandshell.gemspec"
  3. Run "sudo gem install bandshell-xxx.gem"
  4. If this is your personal computer, run "export RACK_ENV=development" to prevent Bandshell from making changes to your networking settings.
  5. Run "bandshelld run" to launch the Sinatra daemon and go to http://127.0.0.1:4567

Cutting the gem for rubygems (project owners only)

To release a new version of the gem, follow these steps:

  1. Open a terminal in the root directory of your local bandshell working copy
  2. Edit bandshell.gemspec and increase the version number, and commit and push this change.
  3. Tag the commit and push the new tag to github git tag -a "1.6" -m "Bandshell version 1.6 tag"; git push origin 1.6
  4. Build the Bandshell gem with "gem build bandshell.gemspec"
  5. Push the gem to rubygems with gem push bandshell-1.6.gem
  6. Check rubygems.org and github.com to make sure the gem and tag have been pushed.

https://rubygems.org/gems/bandshell

Getting a live development environment running

Most end users will run bandshell via its gem, which provides the bandshelld executable to launch the application and daemon. However when working on the app, we want to be able to run it from outside of that environment. Here is a method which will:

  • Launch the bandshell server on port 4567
  • Bypass the normal network configuration stuff, in case we're running on our personal PC and not a dedicated screen box
  • Place the PIDs and output files in the local directory, to avoid permissions problems in case we're not root
  • Run directly out of a git clone

Instructions:

In a bash shell:

git clone https://github.com/concerto/bandshell.git
cd bandshell
bundle install --path vendor/bundle
export RACK_ENV=development
bundle exec bin/bandshelld start

After invoking the start command, you should see two PID files and two output files created. If the webserver failed to start, look into bandshelld.output for error details. Note that successive runs append to this file so you may want to clear it out occasionally.

You can control bin/bandshelld with the start, stop, zap, and status commands. You can also start it up with the run command to get more feedback on the console, which may be useful for debugging. However this will prevent the background daemon from starting, so settings will not be updated from the server.

It is important to note that Sinatra does not have the auto-reloading infrastucture available in Rails. After making changes to classes used by the webserver, you will need to issue a restart command before they come into effect.

Troubleshooting

If you get binding errors you may need to check and see if IPv6 is enabled. (See issue #24 for more information.)

Clone this wiki locally