-
Notifications
You must be signed in to change notification settings - Fork 3
Development Setup
You'll need this to install things like Redis, specialized executables, and development libraries for related gems need by the application, unless you're using docker for this (see below).
To install, go to: https://brew.sh/
Install the version specified in .ruby-version
There are a number of different version managers you can use:
We use docker, by way of docker-compose, to manage dependencies such as Redis and Solr. You can even run the entire Rails app in its own container and eliminate the need for any local Ruby management and homebrew libraries; however, the performance it noticeably faster if you use your local machine for Ruby, Rails, and gems, while using docker for ancillary dependencies such as Solr and Redis.
Docker can be installed different ways. The easiest is probably to just use Docker Desktop. See https://www.docker.com/products/docker-desktop
Install via homebrew
brew install redis
brew services start redis
Or, use the docker image (see below for specific instructions)
While you can technically run this locally, it's much easier to just let docker deal with this (see below for specific instructions).
git clone git@github.com:psu-libraries/psulib_blacklight.git
cd psulib_blacklight
bundle install
bundle exec rake db:create db:migrate
If any gems fail to install, it's usually an indication that you need to install specific development libraries via homebrew. For example, the sqlite gem needs brew install sqlite
to install properly.
The bundler gem is usually installed when you install Ruby, but a gem install bundler
can fix that. Bundler may complain if the version of bundler you're running is different than the one listed in the Gemfile.lock. You can ignore it, or install the specific one with:
gem install bundler -v [version listed in Gemfile.lock]
If you want to use docker for Redis and Solr:
docker-compose up --build redis solr
If you've already built them, the omit the --build
flag
If you want to use Redis locally via homebrew, then just start solr
docker-compose up solr
Changes in the ports or hosts of these services is specified in settings.yml
but all of them are set to their defaults and should not need changing.
Initialize the database and load the test data into Solr:
bundle exec rake db:create db:migrate
bundle exec rake solr:create_collection
bundle exec rake solr:update_config
bundle exec rake solr:create_alias
bundle exec rake solr:load_fixtures
Run the test suite:
bundle exec rspec
bundle exec rails s
And go to http://localhost:3000
Alternatively, you can use puma-dev
Use Traject
To clean out data that is being preserved explicitly run:
bundle exec rails solr:clean
- Home
- Testing Documentation for Product Owner
- Components, Features, and Functions
- Library Faceting and Locations Management
- Advanced Search
- Browse Items By Library of Congress Call Number
- Browse by Subject, Author, and Title
- Availability Display
- Summary Holdings Display
- Holdings and Availability for Bound-Withs
- Holds and ILL
- Requesting Items with Aeon
- Course Reserves
- Google Books and HathiTrust Integration
- Bento Integration
- Indexing and Display
- Sources of Catalog Data
- Display Fields
- Title Fields
- Author and Creator Fields
- Thesis Department
- ISSNs and ISBNs
- URL Fields
- Publication and Edition Fields
- Material Characteristics Fields
- Language Fields
- Subject Fields
- Genre Fields
- Note Fields
- Serials
- Bound-Withs
- Formats
- Media Types
- Access Facet
- Open Access Facet
- Call Numbers
- OCLC Number
- LCCN
- Report Numbers
- Endowment Codes and Names
- Adding Linked to Request Scanning
- Summary Holdings Indexing
- My Account
- Tests
- Development Setup and Notes
- Deployment Notes