My Install of Ruby Development Environment
- Install rbenv (https://github.com/rbenv/rbenv#basic-github-checkout)
- If You don’t have git on Your Mac, You need to run:
xcode-select --install git clone https://github.com/rbenv/rbenv.git ~/.rbenvcd ~/.rbenv && src/configure && make -C src- this is optional, it compiles bash exstension
mkdir -p ~/.rbenv/pluginsgit clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build- Add to ~/.bash_profile
export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"eval "$(rbenv init -)"
- reload terminal window
rbenv install 2.3.1rbenv global 2.3.1
- If You don’t have git on Your Mac, You need to run:
- Install nodenv (https://github.com/nodenv/nodenv#basic-github-checkout)
git clone https://github.com/nodenv/nodenv.git ~/.nodenvcd ~/.nodenv && src/configure && make -C src- this is optional, it compiles bash exstension
mkdir -p ~/.nodenv/pluginsgit clone https://github.com/nodenv/node-build.git ~/.nodenv/plugins/node-build- Add to ~/.bash_profile
export PATH="$HOME/.nodenv/bin:$HOME/.nodenv/shims:$PATH"eval "$(nodenv init -)"
- reload terminal window
nodenv install 8.11.3nodenv global 8.11.3
- Install Postgres desktop App for Mac
- https://postgresapp.com/
- Add to ~/.bash_profile
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
- Run SQL queries:
- In Postgres app double click on “postgres databas”
- OR run in terminal:
/Applications/Postgres.app/Contents/Versions/13/bin/psql -p5432 "postgres" CREATE USER webapp WITH PASSWORD 'webapp';ALTER USER webapp WITH SUPERUSER;
brew install imagemagick- install Docker desktop for Mac
- https://www.docker.com/products/docker-desktop
docker run -p 6379:6379 --restart=unless-stopped -d --name redis redis:alpine
- In project repository
gem install bundler:1.17.1- optionally
rbenv rehashbundle installrbenv rehashrails db:createrails db:migraterails db:seedrails serverrails console- ie: User.first
- ie: User.count
- ie: User.first.update(email: ‘[email protected]’)
That's it for this post, thanks for reading!