Skip to content

Instantly share code, notes, and snippets.

@Sylvance
Last active February 4, 2019 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sylvance/e9270ab8d7ba9460287d89f4af0a4d37 to your computer and use it in GitHub Desktop.
Save Sylvance/e9270ab8d7ba9460287d89f4af0a4d37 to your computer and use it in GitHub Desktop.
Install Rbenv, ruby-build, Ruby and Ruby on Rails on a codeanywhere Blank Ubuntu 14 container

Install gnupg2 and set keys

$ sudo apt-get install gnupg2 -y $ sudo gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

Install RBENV

$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv $ cd ~/.rbenv/ $ sudo src/configure $ sudo ./configure $ sudo make

Add it to the PATH

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc $ ~/.rbenv/bin/rbenv init $ echo 'eval "$(rbenv init -)"' >> ~/.bashrc

Check installation

$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

Install Ruby-build

$ mkdir -p "$(rbenv root)"/plugins $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build

Check installation

$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

Install Ruby

$ rbenv install --list $ rbenv install 2.61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment