Setting up M1 Mac for Ruby on Rails Development
Been using Windows through WSL2 as a daily driver ever since the pandemic started but recently I was given a chance to switch to a Macbook again and because of the M1 hype, it was an easy decision to make. It also helped that I really wanted to get back into iOS development again.
- start with system preferences setup
- map caps lock -> ctrl
- auto hide and show the dock
- install Firefox and set as default browser
- multi-account container is primarily why
- uBlock origin for blocking ads and trackers
- install rectangle for windows management shortcut, previously was using spectacle
- ctrl + option + enter for maximizing current window
- install google drive
- install iterm2 as terminal replacement
- install 1password
- install postgres.app
- install polymail
- install docker
- install xcode
- install visual studio code
- install command line tools:
xcode-select --install
- install homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- install firacode nerd font:
brew install --cask font-fira-code-nerd-font
- install zsh:
brew install zsh zsh-completions
- non-authorized shell, add
/usr/local/bin/zsh
to/etc/shells
- install oh-my-zsh:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- install spaceship-prompt:
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt”
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme”
- generate ssh key:
ssh-keygen -t ed25519 -C "EMAIL"
- setup dotfiles:
git clone [email protected]:lebibin/dotfiles.git
brew install tmux neovim diff-so-fancy the_silver_searcher ripgrep
brew install reattach-to-user-namespace
brew install terminal-notifier git-flow
mkdir -p ~/.vim/files/info
- install tmux plugin manager (tpm):
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
- install wakatime:
curl -fsSL https://raw.githubusercontent.com/wakatime/xcode-wakatime/master/install.sh | sh
- install ruby via asdf and asdf-ruby:
brew install asdf
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
RUBY_CONFIGURE_OPTS="--with-openssl-dir=
brew –prefix [email protected]--with-readline-dir=
brew –prefix readline--with-libyaml-dir=
brew –prefix libyaml" asdf install ruby 3.0.0
asdf global ruby 3.0.0
- install nodejs via asdf-nodejs:
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs 16.15.0
asdf global nodejs 16.15.0