-
Notifications
You must be signed in to change notification settings - Fork 8
Bandshell Development
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.
To cut your own bandshell gem off the latest MASTER code or your own branch, follow these instructions.
- Open a terminal in the root directory of your local bandshell working copy
- Build the Bandshell gem with "gem build bandshell.gemspec"
- Run "sudo gem install bandshell-xxx.gem"
- If this is your personal computer, run "export RACK_ENV=development" to prevent Bandshell from making changes to your networking settings.
- Run "bandshelld run" to launch the Sinatra daemon and go to http://127.0.0.1:4567
To release a new version of the gem, follow these steps:
- Open a terminal in the root directory of your local bandshell working copy
- Edit bandshell.gemspec and increase the version number, and commit and push this change.
- 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 - Build the Bandshell gem with "gem build bandshell.gemspec"
- Push the gem to rubygems with
gem push bandshell-1.6.gem - Check rubygems.org and github.com to make sure the gem and tag have been pushed.
https://rubygems.org/gems/bandshell
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
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 startAfter 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.
If you get binding errors you may need to check and see if IPv6 is enabled. (See issue #24 for more information.)