Adopt-a-Hydrant (Twin Cities)
Claim responsibility for shoveling out a fire hydrant after it snows.
For original documentation, see the this Adopt-a-Hydrant Github page.
Have an Issue, Comment, Feature, Suggestion?
Use the Issue Queue.
Installation and Setup
Install locally
These instructions are for Mac.
- Install RVM. This is needed because Mac comes with Ruby 1.8 and you'll need 1.9.
- Setup a Postgres database (instructions?)
- If you have credentials for your Postgres, update
config/database.yml
as needed. - Install gems:
bundle install
- Setup database:
bundle exec rake db:create; bundle exec rake db:schema:load
- Seed the data:
bundle exec rake db:seed
- Run the server:
rails server
Deploying to Heroku
- Create a heroku app (change app name as needed):
heroku apps:create otc-adoptahydrant
- Set up a DB:
heroku addons:add heroku-postgresql
- Push the code and deply the application:
git push heroku master
- Set up the db:
heroku run rake db:create; heroku run rake db:schema:load
- Seed the data:
heroku run rake db:seed
- Go to application: http://otc-adoptahydrant.herokuapp.com
Rails Admin
The data seeding (see below) will create an admin user. Make sure to log into the application with the default credentials:
accounts@opentwincities.org
CHANGE.ME
And CHANGE THE PASSWORD. Do note that this may not be the best way to make a new admin user, so suggestions are welcome.
The admin dashboard is located at /admin
on your server.
Development
Javascript Development
Still a work in progress.
- Configuration values should go in:
app/assets/javascripts/main.conf.js.erb
- Main application logic in:
app/assets/javascripts/main.js