Skip to content
This repository
tree: 3bc677667c

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 bad_sweepers restored fragment cache sweeper November 22, 2009
Octocat-spinner-32 bin
Octocat-spinner-32 components Added initial Rails app August 17, 2009
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc Added initial Rails app August 17, 2009
Octocat-spinner-32 features - removed cucumber_structure.sql from repository and added to gitignore February 13, 2012
Octocat-spinner-32 lib some bug fixes February 13, 2012
Octocat-spinner-32 log Add log & tmp files to repo for easier checkout November 20, 2009
Octocat-spinner-32 public
Octocat-spinner-32 script add script/delayed_job July 27, 2011
Octocat-spinner-32 spec changed defender gem to working version February 27, 2012
Octocat-spinner-32 tmp Add log & tmp files to repo for easier checkout November 20, 2009
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore - removed cucumber_structure.sql from repository and added to gitignore February 13, 2012
Octocat-spinner-32 .gitmodules Merge master into widgets July 06, 2011
Octocat-spinner-32 .rspec set up initial rspec spec February 02, 2012
Octocat-spinner-32 .rvmrc shorten rvmrc file January 22, 2012
Octocat-spinner-32 .travis.yml - removed cucumber_structure.sql from repository and added to gitignore February 13, 2012
Octocat-spinner-32 CREDITS License update for OC v3 July 26, 2011
Octocat-spinner-32 Capfile More cleanup of config / Cap files November 13, 2009
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Guardfile Add guard and guard-livereload to Gemfile April 25, 2011
Octocat-spinner-32 LICENSE License update for OC v3 July 26, 2011
Octocat-spinner-32 LICENSE-AGPLv3 License update: GPLv3 for content prior to OpenCongress v3. AGPLv3 fo… July 26, 2011
Octocat-spinner-32 README.md some bug fixes February 13, 2012
Octocat-spinner-32 Rakefile rails 3 changes February 24, 2011
Octocat-spinner-32 banned_users_test.txt Added initial Rails app August 17, 2009
Octocat-spinner-32 config.ru rails 3 changes February 24, 2011
Octocat-spinner-32 nohup.out removed debugging code February 07, 2011
Octocat-spinner-32 parsed_reports.txt Added initial Rails app August 17, 2009
README.md

OpenCongress - a Ruby on Rails application for displaying information about Congress

Lighthouse Project Page

OpenCongress for Developers


Getting started with our code

A. Dependencies

Start by installing all the packages required by OpenCongress. The main dependencies are postgres and ImageMagick; OpenCongress will not run on mysql or sqlite. The following commands are suggestions, but ultimately you'll need to get postgres running to be able to run the app. We are currently running version of postgres 8.4.4 in production.

For Ubuntu:

sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev ruby1.8 ruby1.8-dev rubygems libopenssl-ruby imagemagick libmagick9-dev gcj-4.4-jre

For Mac OS X, start by installing MacPorts, then run:

sudo port install postgresql84 postgresql84-doc postgresql84-server ImageMagick md5sha1sum wget

or, if you want to use Homebrew (this will install version Postgres 8.4.4):

brew install imagemagick
brew install https://github.com/adamv/homebrew-alt/raw/master/versions/postgresql8.rb

Follow the instructions after the packages install for initializing your database


Install the bundle:


[sudo] gem install bundler
bundle install

Note for OS X: *You may need to specify additional compile options for your gems. Try: ARCHFLAGS="-arch x86_64" bundle install

B. Database setup

Running the following commands will create an 'opencongress' user and empty databases for the three environments (test, development, production). The migration command will populate the development database with an empty schema.


rake db:init
rake db:migrate

C. Solr (optional, recommended)

OpenCongress uses Solr to store some data. Running Solr is not required to run the web server, but some pages will break if Solr is not running. If you are going to import data, running solr is required or you will encounter errors.

You can run Solr with the following command (usually in the background and/or in a separate window):

rake solr:start

D. Legislative Data (optional)

See note above about running Solr: it is required for importing data.

To import legislative data into your database, run the following command:

rake update:govtrack

This will download data files from Govtrack and import them into your database. The default location for storage of the data files is /tmp/opencongress_data but you can change this by editing config/application_settings.yml. This task will import ALL of the data for the current session of Congress: it will take a long time and occupy a LOT of space on your filesystem! Keep this in mind before importing the data!

E. Starting the server

See note above about running Solr: it is not required, but recommended.

To start the webserver:

rails s

We are actively working to make the install process easier for new volunteers. Special thanks to Doug Cole for moving us along in this regard.



Copyright (c) 2005-2012 Participatory Politics Foundation

OpenCongress is licensed, as a whole, under AGPLv3. Components added prior to OpenCongress version 3 (July 27, 2011) were and are licensed under GPLv3. All components added for or after OpenCongress version 3 are licensed AGPLv3. When you contribute a patch to OpenCongress, it will be licensed under AGPLv3. See LICENSE-AGPLv3 file for details.

Something went wrong with that request. Please try again.