Skip to content

Instantly share code, notes, and snippets.

@parkournick3
Last active March 9, 2024 20:55
Show Gist options
  • Save parkournick3/9c71421d7f3b7262201bdcce70f7dfff to your computer and use it in GitHub Desktop.
Save parkournick3/9c71421d7f3b7262201bdcce70f7dfff to your computer and use it in GitHub Desktop.
How to install Ruby and Ruby on Rails on ubuntu
cd $HOME
sudo apt update
sudo apt install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.3.1
rbenv global 2.3.1
ruby -v
gem install bundler
gem install rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment