Skip to content

Instantly share code, notes, and snippets.

@ryenus
Created May 20, 2012 06:13
Show Gist options
  • Select an option

  • Save ryenus/2755231 to your computer and use it in GitHub Desktop.

Select an option

Save ryenus/2755231 to your computer and use it in GitHub Desktop.
Install ruby and rails with rvm on Ubuntu
# install packages to get RVM
sudo apt-get install build-essential git-core curl
# install RVM
curl -L get.rvm.io | bash -s stable
# load RVM
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
source "$HOME/.rvm/scripts/rvm"
# install packages suggested by `rvm requirements`
sudo apt-get install openssl libssl-dev libreadline6 libreadline6-dev \
zlib1g zlib1g-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev \
autoconf libc6-dev ncurses-dev automake libtool bison subversion
# install packages for mysql and postgresql
sudo apt-get install libmysqlclient-dev libpq-dev
# install nodejs # performs better than therubyracer and not needed in Gemfile
sudo apt-get install nodejs
# one step to install both ruby and rails
curl -L get.rvm.io | bash -s stable --rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment