Created
November 2, 2014 22:35
-
-
Save tamouse/16c86c471c61e7c1bcc7 to your computer and use it in GitHub Desktop.
Install ruby from source on debian-based linux distros.
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
# as root: | |
apt-get update | |
apt-get install build-essential git-core curl bison openssl \ | |
libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev \ | |
libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev \ | |
libcurl4-openssl-dev libopenssl-ruby apache2-prefork-dev libapr1-dev \ | |
libaprutil1-dev libx11-dev libffi-dev tcl-dev tk-dev | |
cd /usr/src | |
# Note: exact version will vary, of course. | |
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz | |
tar zxvf ruby-2.1.4.tar.gz | |
cd ruby-2.1.4 | |
./configure --prefix=/usr # overwrite system installed ruby | |
make # compiles the source | |
make install # installs the programs in /usr/bin, etc | |
# check the install | |
cd | |
which ruby; ruby --version | |
which irb; irb --version | |
which gem; gem --version | |
which rake; rake --version | |
# install bundler | |
gem install bundler | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is if for some reason you don't want to use ruby-install, rvm, rbenv, or a distro package.