UMAP GeoData is the University of Massachusetts Amherst's GeoBlacklight instance, managed and hosted by the University Libraries.
UMAP GeoData v1.1.1 / GeoBlacklight v4.1.
View the full GeoBlacklight release and technology dependency matrix here: Releases.
GoRails has great Ruby on Rails setup instructions for macOS, Ubuntu, and Windows. It goes through the general process to get up and running, but it doesn’t cover everything, and it may be preferable to install each dependency following separate tutorials.
Workflow to setup an M1 MacBook:
-
Follow the latest documentation to install Homebrew.
-
It's recommended to install Ruby on Rails with a version manager, like rbenv:
brew install rbenv
Then, ensure the version manager is loaded in your shell. For Macs using zsh, use
nano ~/.zshrc
to open the file and add the following lines of code:export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
Save, then restart with
source ~/.zshrc
. -
Install ruby, bundler, and rails (see this tutorial by Digital Ocean).
-
Install node.js with
brew install node
. This should also install npm. -
Follow the latest documentation to install yarn. (You may need to install corepack if the first step in the yarn documentation fails.
brew install corepack
) -
Install java with
brew install java
, then follow the suggested commands to establish a symlink. -
Install mysql with
brew install mysql
, then start the database withbrew services start mysql
. Optionally, run the suggested commands to secure the database.
-
Clone the project:
cd <your project directory> git clone [email protected]:/umass-gis/geoblacklight.git
-
Duplicate the .example files in the project and remove the .example string from each of their filename:
cp .example.env.development .env.development cp .example.env.test .env.test
Then, update the MYSQL_USER and MYSQL_PASSWORD credentials in these files. These variables are called by
database.yml
when establishing a connection to the database. -
Navigate to the project directory and install the ruby gems with
bundle install
. -
Install the yarn packages with
yarn install
. -
Create and migrate the databases:
Development environment:
bundle exec rails db:create bundle exec rails db:migrate
Test environment:
RAILS_ENV=test bundle exec rails db:create RAILS_ENV=test bundle exec rails db:migrate
The rake task below will spin up Solr, index the test fixture documents, and start the default Rails web server.
bundle exec rake umass:server
- View the application at http://localhost:3000
- View the Solr admin panel at http://localhost:8983
Stop any instances of GeoBlacklight before running this command.
RAILS_ENV=test bundle exec rake ci
Delete all data from the Solr index
bundle exec rake umass:index:delete_all
Index just the UMass test fixtures
bundle exec rake rake umass:index:umass