Skip to content

Instantly share code, notes, and snippets.

View davidlowry's full-sized avatar

David Lowry davidlowry

View GitHub Profile
@davidlowry
davidlowry / gist:53812a983392b7d8dc8453ba317ac80d
Created December 7, 2023 17:06
Installing MySQL gem for Rails bundler on Mac Silicon
# Install rails, mysql, etc by homebrew using this guide https://gorails.com/setup/macos/10.14-mojave - but if you require mysql and can't upgrade to Trilogy, this is required (and not in the guide at time of writing)
# With credit to Chris Oliver @excid3 at Go Rails
mysql_version=$(brew list --versions mysql | tr ' ' '\n' | tail -1)
mysql_path=$(brew --cellar mysql)/$mysql_version
gem install mysql2 -- \
--with-mysql-lib=$mysql_path/lib \
--with-mysql-dir=$mysql_path \