I will write it as a memorandum because my mac broke down and I had to reinsert it. It also lists non-essential settings such as heroku and item2 settings.
Command Line Tools
xcode-select --install
Is heavy, so install xcode and do it here
xcode-select -version
Homebrew https://brew.sh/index_ja
brew -v
rbenv
brew install rbenv ruby-build
vi .zshrc
/.zshrc
# zsh-completions(Complementary function)settings of
if [ -e /usr/local/share/zsh-completions ]; then
fpath=(/usr/local/share/zsh-completions $fpath)
fi
autoload -U compinit
compinit -u
# prompt
PROMPT='%m@%n %F{1}%~%f$ '
##################################################
### aliases
#Git system
alias g='git'
alias gs='git status'
alias gb='git branch'
alias gc= 'git clone'
alias gco='git checkout'
alias gct='git commit'
alias gg='git grep'
alias ga='git add'
alias gd='git diff'
alias gl='git log'
alias gcma='git checkout master'
alias gfu='git fetch upstream'
alias gfo='git fetch origin'
alias gmod='git merge origin/develop'
alias gmud='git merge upstream/develop'
alias gmom='git merge origin/master'
alias gcm='git commit -m'
alias gpo='git push origin'
alias gpom='git push origin master'
alias gst='git stash'
alias gsl='git stash list'
alias gsu='git stash -u'
alias gsp='git stash pop'
export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/.rbenv/shims:$PATH"
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"
export CC=/usr/bin/gcc
# Setup Compiler paths for readline and openssl
local READLINE_PATH=$(brew --prefix readline)
local OPENSSL_PATH=$(brew --prefix openssl)
export LDFLAGS="-L$READLINE_PATH/lib -L$OPENSSL_PATH/lib"
export CPPFLAGS="-I$READLINE_PATH/include -I$OPENSSL_PATH/include"
export PKG_CONFIG_PATH="$READLINE_PATH/lib/pkgconfig:$OPENSSL_PATH/lib/pkgconfig"
# Use the OpenSSL from Homebrew instead of ruby-build
# Note: the Homebrew version gets updated, the ruby-build version doesn't
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$OPENSSL_PATH"
# Place [email protected] at the beginning of your PATH (preempt system libs)
export PATH=$OPENSSL_PATH/bin:$PATH
# Load rbenv
eval "$(rbenv init -)"
# Extract the latest version of Ruby so you can do this:
# rbenv install $LATEST_RUBY_VERSION
export LATEST_RUBY_VERSION=$(rbenv install -l | grep -v - | tail -1)
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"
export PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig
# Ruby 2.Db for 7 and Rails 6:Turn off the warning with create
# export RUBYOPT='-W:no-deprecated -W:no-experimental'
source ~/.zshrc
rbenv
ruby install
rbenv install -l
install
rbenv install 2.7.1
I saw this when I couldn't (https://github.com/rbenv/ruby-build/issues/1409)
rbenv global 2.7.1
ruby --version
Bundler
** A tool for managing gem dependencies and versions **
gem install bundler
Rails
gem install rails
rbenv rehash
yarn Required for installing webpacker
brew install yarn
I don't know, but it seems to be good to put this in ([Reference](https://qiita.com/Alex_mht_code/items/d2db2eba17830e36a5f1#5%E8%BF%BD%E8%A8%98rbenv-communal-gems%E3%] 81% AF% E5% 85% A5% E3% 82% 8C% E3% 81% A6% E3% 81% 8A% E3% 81% 8D% E3% 81% BE% E3% 81% 97% E3% 82% 87% E3% 81% 86)))
brew install rbenv-communal-gems
webpacker Since webpacker has become a standard specification from Rails6, it is necessary to install yarn.
rails webpacker:install
/.zshrc
export RUBYOPT='-W:no-deprecated -W:no-experimental'
brew install [email protected]
####Verification
mysql --version
#git ssh settings https://qiita.com/shizuma/items/2b2f873a0034839e47ce
#Commands to enter to be happy with git
reference: https://qiita.com/west-hiroaki/items/9560f0504c3bdfe970f5#shell%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89
#Heroku settings
brew tap heroku/brew && brew install heroku
Check for the time being https://devcenter.heroku.com/articles/heroku-cli
#iTerm2 settings https://note.com/digiangler777/n/n8206e2163904
#Show hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Open Finder again
Recommended Posts