The website behind Open Plaques
This project requires:
- Ruby (version as specified in the
Gemfile) - Postgres
- Bundler (installable with
gem install bundler)
- Copy
example.envto.env– this file is used for configuring environment variables. - Add a random value for
SECRET_KEY_BASEin the.envfile. You can generate this by runningbundle exec rake secreton the command line. - Copy
database.example.ymltodatabase.yml. - Create two databases for development and testing, and specify these in the
database.ymlfile. - Run
bundle installto install Gem dependencies. - Run
bundle exec rake db:setupto setup the database.
This should just be a case of running foreman start on the command line. The output will tell you which URL
you can view it at. Typically this will be http://localhost:5000.
When changes to the database schema are required (which you will be warned about), you can make these
changes by running bundle exec rake db:migrate.
You can run the tests (which check that the code does what we expect it to do) by running bundle exec rspec.
If you see 0 failures then everything is ok.
- Run a backup with 'heroku pg:backups public-url --app open-plaques-beta'
- Get the url 'heroku pg:backups public-url --app open-plaques-beta'
- and download it
- create a new empty database
- restore it into postgres (I use the pgAdmin3 graphical tool)