Getting set-up locally
- Ruby 1.9
- Rubygems and Bundler
- Imagemagick and Ghostscript (for generating thumbnails of uploaded PDFs)
Creating the mysql user
The database.yml for this project is checked into source control so you'll need a local user with credentials that match those in database.yml.
mysql> grant all on `whitehall\_%`.* to whitehall@localhost identified by 'whitehall';
Preparing the app
$ cd /path/to/whitehall $ bundle install $ bundle exec rake db:create:all $ bundle exec rake db:schema:load
Running the server locally
$ script/rails s
Creating new users in Production
New users will need a sign-on-o-tron account before they can access whitehall in production. You can create new sign-on-o-tron accounts with the capistrano task in alphagov-deployment/sign-on-o-tron. This will email the new user and prompt them to create their account.
Using local assets
STATIC_DEVto point to your local instance of the
staticapp when running the
Getting search running locally
The Whitehall app relies on a separate instance of Rummager for document search. The default (citizen) configuration is overridden by the
whitehall-rummager project in the deployment repository.
To use a local copy of Rummager you'll need to:
- Tell Rummager to use the whitehall Solr core by setting
- Tell Rummager to listen for requests on the whitehall path prefix by setting
RUMMAGER_HOSTto point to the local instance of Rummager (e.g.
- You'll also need to set
RUMMAGER_HOSTwhen using the Rummager rake tasks e.g.
RUMMAGER_HOST=http://rummager.dev rake rummager:index.
- Optional: if you want to hit the Rummager app directly from a browser (i.e. not using
Accept: application/json), e.g. to see how the citizen app works, then you may want to set
SLIMMER_ASSET_HOSTto point to your local instance of the
To use a local copy of Solr - see the instruction in the Rummager README.md.