Code Monkey home page Code Monkey logo

harvard-curiosity's Introduction

CURIOSity

CURIOSity enables researchers to discover and easily access a wealth of curated, publicly accessible, digitized materials.

Technology Stack

Language

Ruby on Rails

Framework

Blacklight / Spotlight

Running the stack

Important URLs

dev: https://localhost:21407/

Local Development Environment Setup Instructions

1. Clone the project

git clone [email protected]:harvard-lts/CURIOSity.git

2: Create app environment variables

Create config file for environment variables
  • Make a copy of the config example file ./env-example
  • Rename the file to .env
  • Replace placeholder values as necessary

Note: The config file .env is specifically excluded in .gitignore and .dockerignore, since it contains credentials it should NOT ever be committed to any repository.

3. Enable full containerization overrides

cp docker-compose.override.example.yml docker-compose.override.yml

4. Build the Docker image(s)

docker compose build

5. Build the Docker image(s) and bring up the stack

docker compose -f docker-compose.yml -f docker-compose.override.yml up -d --build --force-recreate

After running the above commands, check that you see the following output in the terminal, then navigate to https://localhost:21407/

curiosity-db_migrate-1 exited with code 0

Admin login info

You can find login credentials in the db/seeds.rb file. These SHOUDL NOT be brought in to anything beyond local.

To import these:

docker exec -it harvard-curiosity-web-1 sh
bundle exec rails db:migrate
bundle exec rails db:seed

How to run the test stack

Bash into the web container docker compose exec web sh

Create & migrate the test database RAILS_ENV=test bin/rails db:create db:migrate

Run your specs (this will run the whole test suite, if you would like to run an individual test, add the relative path to the end.) bin/rspec

Troubleshooting

NoMethodError in Spotlight::ExhibitsController#index
undefined method `current_exhibit = 'for I18n::Backend::ActiveRecord::Translation(Table doesn't exist):Class

Try: restarting the containers or shelling in and re-running migrations

  • If you run into this error the first time you are running the test suite
  ActiveRecord::NoDatabaseError:
  connection to server at "192.168.32.2", port 5432 failed: FATAL:  database "spotlight_test" does not exist

Try:

  • Comment out lines 8-23 in config/initializers/translation.rb
  • Comment out lines 27-32 in spec/rails_helper.rb
  • Run the command to create and migrate the test db again: RAILS_ENV=test bin/rails db:create db:migrate

harvard-curiosity's People

Contributors

phil-plencner-hl avatar summer-cook avatar dl-maura avatar mferrarini avatar orangewolf avatar sephirothkod avatar bkiahstroud avatar aprilrieger avatar kirkkwang avatar enriquediaz avatar jeremyf avatar labradford avatar shanalmoore avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.