Last active
April 21, 2023 11:48
-
-
Save omkz/4e784f46193f0b5b094cd25c80a60202 to your computer and use it in GitHub Desktop.
Setup Ruby on Rails on Ubuntu 20.04 for development machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zsh | |
sudo apt-get install zsh | |
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
chsh -s $(which zsh) | |
# rbenv | |
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(rbenv init -)"' >> ~/.zshrc | |
source ~/.zshrc | |
#then logout and login again | |
# ruby | |
sudo apt install git curl autoconf bison build-essential \ | |
libssl-dev libyaml-dev libreadline6-dev zlib1g-dev \ | |
libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev | |
rbenv install 2.7.2 | |
rbenv global 2.7.2 | |
gem install rails | |
#nodejs | |
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | |
echo 'export NVM_DIR=~/.nvm' >> ~/.zshrc | |
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' >> ~/.zshrc | |
source ~/.zshrc | |
nvm install --lts | |
nvm alias default node | |
#yarn | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt update | |
sudo apt install --no-install-recommends yarn | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment