Installation on Mac for Apple Sillicon
HH-Server Setup on MacOs Apple Silicon 1. Update macOS:
- Go to System Settings > General > Software Update to ensure you have the latest version of macOS.
- This is crucial for security updates and compatibility with other tools. 2. Install Xcode Command Line Tools:
- Open Terminal and run
xcode-select --install. - This installs essential command-line tools like clang, git, and others needed for development. 3. Install Homebrew:
- Homebrew is a package manager for macOS that simplifies installing and managing software.
- Open Terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Follow the on-screen instructions to complete the installation.
- After installation, run brew doctor to check for any potential issues. 4. Configure your Shell (zsh):
- macOS uses zsh as the default shell.
- Install Oh My Zsh for an enhanced terminal experience.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
••You can further customize your shell with themes and plugins, such as Starship.
✅ Setup Guide for Ruby 2.7.8 on macOS (Apple Silicon M1/M2/M3/M4)
📦 1. Install dependencies for Ruby
brew install rbenv ruby-build openssl@1.1 readline libyaml gmp
🧠 2. Set up rbenv in your shell
Add the following lines to your ~/.zshrc:
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init - zsh)"
Then reload the shell:
source ~/.zshrc
📌 3. Make sure openssl@1.1 is properly linked
brew unlink openssl@1.1
brew link openssl@1.1 --force
If you still get OpenSSL errors during Ruby installation, fix the symlink manually:
sudo rm -rf /opt/homebrew/opt/openssl@1.1
ln -s /opt/homebrew/Cellar/openssl@1.1/1.1.1w /opt/homebrew/opt/openssl@1.1
💎 4. Install Ruby 2.7.8 using rbenv
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" rbenv install 2.7.8
🚀 5. Set Ruby 2.7.8 as the global default
rbenv global 2.7.8
rbenv rehash
ruby -v # => Make sure it outputs: ruby 2.7.8
📦 6. Install Bundler
gem install bundler
🧼 7. (Optional) Remove RVM if you used it previously
rvm implode
Then remove any leftover RVM references from your ~/.zshrc, ~/.bashrc, or ~/.bash_profile.
⚖️ Difference Between rbenv vs rvm
| Feature | rbenv | rvm |
|---|---|---|
| How it works | Modifies PATH and uses shims (~/.rbenv/shims) | Uses shell functions and environment manipulation |
| System overhead | Lightweight, minimal changes to shell | Heavier, can interfere with shell configuration |
| Environment isolation | Combine rbenv + ruby-build + bundler | Built-in gemsets for isolation |
| Gemset management | Not built-in (plugin required) | Built-in with rvm gemset |
| Ruby version customization | More flexible for custom builds (via ruby-build) | Requires setting RUBY_CONFIGURE_OPTS, sometimes tricky |
| Compatibility | More stable on modern macOS and ARM (M1/M2/M4) | Often needs workarounds on new macOS versions |
| Installation | Faster, minimal dependencies | Slower, more dependencies |
| Community support | Active, more recommended by the Ruby core team | Still active, but not recommended by core maintainers |
💡 So, which one is right for you?
✅ Choose rbenv if:
- You want stability and simplicity
- You work on a Mac (especially M1/M2/M3/M4 Apple Silicon)
- You don't need gemsets (or you're fine using
bundlerand.ruby-version) - You want minimal setup and fewer errors
✅ Choose
rvmif: - You like the built-in gemset feature
- You're already used to RVM and prefer not to migrate
- You rely on automation scripts that depend on RVM
👑 Recommendation
For the latest macOS (Sonoma, Ventura) and Apple Silicon Macs, rbenv + ruby-build is the most stable and recommended setup by the Ruby community and core maintainers.
Here is the full guide to installing MySQL 8.4 on a MacBook (Apple Silicon) using Homebrew, the safest and most stable method on macOS:
✅ 1. Make Sure Homebrew is Installed
First, check if Homebrew is already installed:
brew --version
If it's not installed, install Homebrew with the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the instructions until the installation is complete, then run:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
✅ 2. Install MySQL 8.4
Run the following command to install MySQL 8.4:
brew install mysql@8.4
This will download and install MySQL 8.4.
✅ 3. Link MySQL to Make It Directly Usable
Since Homebrew doesn’t automatically link specific versions, run:
brew link mysql@8.4 --force
✅ 4. Start the MySQL Service
To start MySQL and enable it to run automatically at system startup:
brew services start mysql@8.4
Or, to start it just once without autostart:
mysql.server start
✅ 5. Test the MySQL Connection
Try logging in to MySQL:
mysql -u root
If successful, you’ll enter the MySQL prompt (mysql>) where you can begin running queries.
✅ 6. (Optional) Change the Root Password
For security, you can set a password for the root user:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_new_password';
FLUSH PRIVILEGES;
✅ 7. (Optional) Check Version and Service Status
To check the installed MySQL version:
mysql --version
To check the status of the MySQL service:
brew services list
Git Clone hh-server and install node, npm, yarn
git clone git@github.com:hungryhub-team/hh-server.git
Bundle install
brew install nvm
mkdir ~/.nvm
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc
echo '[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh"' >> ~/.zshrc
source ~/.zshrc
verif node -v and npm -v
node -v
npm -v
install yarn
npm install --global yarn
yarn install
install redis
brew install redis
brew services start redis
install memcached
brew install memcached
brew services start memcached