This repository tracks the implementation of GeoBlacklight used to power the front-end of NYU Libraries' Spatial Data Repository
You will need the following installed:
- Git
- MySQL
- Ruby 3.2.2
- NodeJS 20+
- Java 11+
(Check specific versions in .tool-versions)
If you don't already have the prerequisites installed on your Mac laptop you can use Homebrew and asdf to install everything you need:
$ brew install git mysql asdfYou'll need to set up asdf for your chosen shell and then you'll be able to install the required language plugins:
$ asdf plugin add ruby
$ asdf plugin add java
$ asdf plugin add nodejsCheckout the project repo:
$ git clone https://github.com/NYULibraries/spatial_data_repository.git
$ cd spatial_data_repositoryNext, load the correct Ruby, Node, and Java versions using your version managers. If you're using asdf, you can do this with:
$ asdf installFinally, install the ruby gems and node modules, load the data, and start the server:
$ bundle install
$ npm install
$ bundle exec rake db:schema:load
$ bundle exec rake sdr:server
The development SDR web application will be available at http://localhost:3000
The development Solr instance will be available at http://localhost:8989/solr
If the mysql2 gem fails to install and complains about not finding zstd you may need to do the following:
$ gem install mysql2 -v '0.5.6' -- --with-opt-dir=$(brew --prefix openssl) --with-ldflags=-L/opt/homebrew/opt/zstd/libFirst, start up the Rails app if it's not already running:
$ bundle exec rake sdr:serverThen in another terminal run the following Rake task:
$ bundle exec rake sdr:load_nyu_dataOnce completed, head to http://localhost:3000/?search_field=all_fields and you should have a lot more data to work with.
The Solr instance does not persist its data between runs so you will need to reload the data if you ever restart the web application.
To run the full test suite use the following command:
$ bundle exec rake ciThis command will start up Solr with a sdr-core-test core and then run the full test suite.
Some specs (like feature specs) require a sdr-core-test core set up in Solr. This is automatically done when running the full test suite using the command above, but for running individual specs you'll need to start it up manually. You can do that using the following command:
$ bundle exec rake sdr:testThen, in another terminal window (or your IDE), run the individual spec.
Note: You'll know this step is necessary if an individual spec fails with an error like the following:
Blacklight::Exceptions::ECONNREFUSED: Connection refused - Unable to connect to Solr instance using #<RSolr::Client:0x0000000117d5e1a8 @uri=#<URI::HTTP http://127.0.0.1:8983/solr/sdr-core-test/>
We use Capistrano to manage deployments.
To deploy to an environment, use the following command:
$ bundle exec cap staging deployTo do a dry-run of a deployment, add the -n flag:
$ bundle exec cap staging deploy -nTo deploy a specific branch to the deployment environment, set a BRANCH environment variable:
$ BRANCH=foobar bundle exec cap staging deploy- Documentation Repo
- Wiki for GBL 0.12.1
- some info obsolete but contains some supporting doc and application change tracking