How to Install Samvera Hyrax on macOS
Samvera Hyrax is an open-source web application that helps institutions create and manage digital repositories. In this tutorial, we will guide you through the steps of installing Samvera Hyrax on macOS.
Prerequisites
- macOS (version 10.11 or higher)
- Ruby (version 2.5.0 or higher)
- RubyGems (version 2.6.14 or higher)
- SQLite (version 3 or higher)
- Node.js (version 8 or higher)
- Yarn (version 1.13 or higher)
Installation Steps
1. Install Homebrew
Homebrew is a popular package manager for macOS. You can install it by opening the Terminal app and running the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
2. Install Required Dependencies
Use Homebrew to install the required dependencies:
brew install imagemagick sqlite node yarn
3. Install Ruby
You can install Ruby using a version manager like rbenv or rvm. Here we will use rbenv:
brew install rbenv
After installing, add the following line to your shell profile (~/.bashrc, ~/.zshrc, or ~/.profile):
eval "$(rbenv init -)"
Then, install Ruby:
rbenv install 2.7.2
rbenv global 2.7.2
4. Install Bundler and Rails
Bundler is a Ruby tool for managing dependencies of a project. Rails is a popular web application framework. To install Bundler and Rails, run the following commands:
gem install bundler
gem install rails
5. Install Samvera Hyrax
You can install Samvera Hyrax by cloning the GitHub repository:
git clone https://github.com/samvera/hyrax.git
cd hyrax
Next, use Bundler to install the required gems:
bundle install
6. Configure the Application
Copy the example configuration files and modify them as needed:
cp config/database.yml.example config/database.yml
cp .env.example .env
7. Setup the Database
Create the database and run the migrations:
rails db:create
rails db:migrate
8. Start the Application
Start the application server:
rails server
You can access the running application by pointing your web browser to http://localhost:3000.
Congratulations! You have successfully installed Samvera Hyrax on your macOS machine.