This page contains information on running the "spotlight" Rails application in a local development environment.
The following procedure assumes the following are installed on the local workstation:
- RVM
- Ruby 3.0.6
- Node v18
- Yarn 1.22.x
- ImageMagick
- On MacOS, can be installed via
brew imagemagik
- On MacOS, can be installed via
-
In an empty directory, clone the Git repository and switch into the directory:
$ git clone git@github.com:umd-lib/spotlight.git $ cd spotlight -
Checkout the appropriate Git tag, branch, or commit for the Docker image.
-
Switch out of the application and back in to enable RVM to configure Ruby and the gemset:
$ cd .. $ cd spotlight
-
Install the "bundler" gem:
$ gem install bundler --version 2.5.6
-
Install the application gems:
$ bundle config without production $ bundle install
-
Install the Node packages:
$ yarn
-
Run the database migration:
$ SKIP_TRANSLATION=1 rails db:migrate
-
Run the application:
$ rails server
-
In a new terminal, switch into the project directory, and run a Solr Docker image:
$ docker run --rm -p 8983:8983 --name spotlight_solr \ -v $PWD/solr:/opt/solr/server/solr/configsets/blacklight-core \ solr:9.5.0 solr-precreate blacklight-core /opt/solr/server/solr/configsets/blacklight-core -
In a new terminal, switch into the project directory, and run a Redis Docker image:
$ docker run --rm --publish 6379:6379 redis:7.2.4
-
In a new terminal, switch into the project directory, and run Sidekiq:
$ sidekiq
-
In a web browser, go to
The Spotlight home page will be displayed.
-
The first user to log in is the administrator. To add a user, go to
http://localhost:3000/users/sign_up
and fill out the form.