- Ruby 2.7.8 (built with OpenSSL 1.1.1)
- Bundler 2.4.22
- Solr 5.x–6.2.0
- Fedora Commons 4.5.1+
- MySQL 8.0+
- Redis
- ImageMagick
- Java 8 (for Fedora)
- LibreOffice
- Ruby 2.7.8 (build instructions same as above, but runs natively on Intel)
- All other dependencies same as Apple Silicon
- No special compiler flags needed for native extensions
Note: Solr will not run properly if there are spaces in any of the directory names in its path.
git clone https://github.com/uclibs/ucrate.git ./path/to/ucrate
cd ./path/to/ucrate
git checkout developInstall Homebrew packages:
brew install sqlite3 mysql-client redis solr@8 imagemagick@6 libreoffice libsodium zstdInstall Java 8 (required for Fedora):
brew install --cask temurin@8Verify Java 8 is available:
/usr/libexec/java_home -v 1.8Build OpenSSL 1.1.1 (required by Ruby 2.7.8):
cd /tmp
curl -fL -o openssl-1.1.1w.tar.gz https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar -xzf openssl-1.1.1w.tar.gz && cd openssl-1.1.1w
./Configure darwin64-arm64-cc --prefix=/usr/local/opt/openssl@1.1 no-shared
make -j$(sysctl -n hw.logicalcpu)
sudo make install_swInstall Ruby 2.7.8 via rbenv:
brew install rbenv ruby-build
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl@1.1" rbenv install 2.7.8
rbenv local 2.7.8Install Bundler & gems:
gem install bundler -v 2.4.22
cd /path/to/ucrate
export CFLAGS="-Wno-incompatible-function-pointer-types"
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib -L$(brew --prefix zstd)/lib"
bundle _2.4.22_ config set build.mysql2 "--with-mysql-config=$(brew --prefix mysql-client)/bin/mysql_config"
bundle _2.4.22_ installInstall Homebrew packages:
brew install sqlite3 mysql-client redis solr@8 imagemagick@6 libreoffice libsodiumInstall Java 8:
brew install --cask temurin@8Verify Java 8 is available:
/usr/libexec/java_home -v 1.8Install Ruby 2.7.8 via rbenv:
brew install rbenv ruby-build
rbenv install 2.7.8
rbenv local 2.7.8Install Bundler & gems:
gem install bundler -v 2.4.22
cd /path/to/ucrate
bundle installStart these services in separate terminal tabs (foreground; do not append &):
All platforms:
export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
export PATH="$JAVA_HOME/bin:$PATH"
bundle exec fcrepo_wrapper -p 8984All platforms:
bundle exec solr_wrapper -d solr/config/ --collection_name hydra-developmentAll platforms:
redis-serverAll platforms:
Make sure this terminal is in your ucrate project directory.
bundle exec rake db:migrate
bundle exec rails hyrax:default_admin_set:create
bundle exec rails hyrax:default_collection_types:create
bundle exec rails hyrax:workflow:load
rails serverVisit http://localhost:3000
In a new terminal:
bundle exec rails consoleIn the Rails console:
admin = Role.find_or_create_by(name: "admin")
admin.users << User.find_by_user_key("your_email@example.com")
admin.save
exitStart these services in separate terminal tabs (foreground; do not append &):
All platforms:
export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
export PATH="$JAVA_HOME/bin:$PATH"
bundle exec fcrepo_wrapper -p 8080All platforms:
bundle exec solr_wrapper -d solr/config/ --collection_name hydra-test -p 8985All platforms:
redis-serverAll platforms:
Make sure this terminal is in your ucrate project directory.
RAILS_ENV=test bundle exec rake db:migrate
bundle exec rake specbundle exec brakeman -q -w 2
bundle-audit check --updateCause: fcrepo_wrapper is installed as a gem in this app, not as a global system command.
Fix:
cd /path/to/ucrate
bundle install
bundle exec fcrepo_wrapper -p 8984Cause: Java 8 is not installed or not active in the current terminal.
Fix:
brew install --cask temurin@8
export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
export PATH="$JAVA_HOME/bin:$PATH"
java -version
bundle exec fcrepo_wrapper -p 8984Cause: Redis is not installed yet.
Fix:
brew install redis
redis-server --version
redis-serverExamples:
Top level ::CompositeIO is deprecated...rb_check_safe_obj will be removed in Ruby 3.0Pattern matching is experimental...irb: warn: can't alias context from irb_context
Cause: This app runs on an older Rails/Ruby dependency stack, and some gems emit warnings on startup.
What to do:
- If you see
Loading development environmentand get anirbprompt, you can continue. - Treat these as non-blocking warnings unless the console exits with an exception.
This software has been developed by and is brought to you by the Samvera community. Learn more at the Samvera website