To run JRuby you will need java version 21 or higher.
java --versionopenjdk version "21.0.8" 2025-07-15
OpenJDK Runtime Environment Homebrew (build 21.0.8)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.8, mixed mode, sharing)
Follow these instructions to install JRuby if you do not already have it. Alternatively you can try running rbenv install within the root directory of this project.
ruby --versionShould match the version in .ruby_version.
Make sure you have ssh keys established on your machine
Make sure you have docker installed and running
Clone the application and install:
git clone git@github.com:psu-libraries/psulib_traject.git
cd psulib_traject
bundle installFor local development, you can change the settings by adding configuration files. These will be ignored by git.
Create 2 files: config/settings.local.yml and config/settings/test.local.yml and add the following lines to each:
solr:
url: http://localhost:8983/solr/
port: 8983Change the URL and port numbers if you want to use a different port. You will also need to set your environment variables with the Solr username and password.
When using jruby, traject will use multiple threads, but we want to tailor that to our system. In
config/settings.local.yml add:
processing_thread_pool: 5Start Solr via the Docker container
bundle exec rake docker:upThis will download and configure Solr, if it's not already present, or if it is, start up the container again. If you need to reconfigure Solr:
bundle exec rake docker:clean
bundle exec rake docker:confConvert marc records and import into Solr
bundle exec traject -c config/traject.rb solr/sample_data/sample_psucat.mrc For testing purposes you can run traject with the --debug-mode flag to
display the output to the console (and not push the data to Solr).
bundle exec traject --debug-mode -c config/traject.rb solr/sample_data/sample_psucat.mrc