Welcome to the new The Ballot
Make Your Own!
Here's how you get this baby started on your machine:
Open up Terminal or command prompt or however you do rails commands (are you confused? start here )
Move the terminal to wherever your ballot's been installed so you'll type
cd ~/your/location/ballotto move that directory.
Update the installation and the data base
rake db:migrateto update your bundle and database.
EventMachine - on a mac - should work if you have XCode 4.4 + the Command Line Tools
RMagick will need to have ImageMagick installed - do this with Homebrew
brew install imagemagick from a mac with homebrew - other machines here
I've created a single command,
bundle exec rake seedthat will: Create your database schema via
rake db:migrate, load data from
lib/meaasures.csvinto the database, create a .env file for Foreman that's used to start Rails
Start the rails server with
foreman startat http://localhost:3000
User accounts are handled exclusively through Facebook (for now), to use: Register a new application and move the Facebook API ID and Facebook SECRET into your .env file. You'll need to point the Facebook app back at your local machine by setting the App Domain and Site URL to http://localhost:3000;
:admin => truewill have access to an admin panel at the /admin address. From there you an block / unblock users, flag/unflag comments, edit Choices / Options (the objects that make up Ballot Measures / Canddiates). To elevate a user start the Rails console
rails cthen update the user
Deploying to Heroku
Heroku doesn't like LESS - so it's best if you compile things locally before pushing things. I've created a deploy script that will: create and switch to a new git branched called
compiled, remove old assets and compile the assets, commit these newly created assets, push master to remote branch heroku.
install the heroku binarys (these can be found at the heroku website)
add the heroku remote repo to your app with the following command
git heroku git:remote -a the-ballot
To run type
bundle exec rake deploy