This is the frontend Ruby on Rails application for DPLA platform.
We welcome pull requests for bug fixes and new features. Please use a separate feature branch for each pull request.
Here's what you need to do if you want to get set up to, for example, fix a bug or add a feature -- and submit a pull request, of course.
This will also allow you to build a whitebox version of the dpla.org web site.
NOTE: Because the current dependencies include native Gems, it may be difficult to install them on Windows. Two known extensions include Rmagic & debug_inspector.
- Git
- Ruby - ruby, ruby-dev, build-essential
- RMagic gem prereqs - imagemagick and libmagickwand-dev
- Postgresql - postgresql-common, postgresql, pgadmin3
This procedure was tested on Ubuntu. It may need to be adapted for other operating systems.
-
Install Git
sudo apt-get install git
-
Download sources
cd dpla-frontend```
-
Install Ruby & related dependencies
sudo apt-get install imagemagick libmagickwand-dev```
-
Install necessary Ruby Gems
bundle install --deployment
-
Install PostgreSQL
sudo apt-get postgresql-common, postgresql, pgadmin3
-
Configure PostgreSQL & create development database
psql (9.1.10) Type "help" for help. postgres=# pwd postgres-# \password postgres```
ie enter the command \password postgres
at the postgres-#
prompt
After entering the new password twice, press ctrl/D to exit.
Now create the development database:
sudo -u postgres createdb dpla_development
Finally, copy config/database.yml.example
to config/database.yml
and edit
it to provide your username, password, and database for the development
configuration:
development:
adapter: postgresql
host: localhost
encoding: unicode
database: dpla_development
username: postgres
password: <postgres password>
-
Copy
config/environments/development.yml.example
toconfig/environments/development.yml
, and edit it to provide your DPLA API key -
Build the front end assets
rake assets:precompile
-
Run the database migrations
rake db:migrate
-
Start the local Rails server
rails server
You should now be able to point your browser at http://localhost:3000/
and
see your local copy of the DPLA front end.
This application is released under an AGPLv3 license.
- Copyright Digital Public Library of America, 2015 -- 2017
We use BrowserStack to test this code in as many different devices and platforms as we can.