Created
May 16, 2014 12:02
-
-
Save casecode/29a757c12976306fb148 to your computer and use it in GitHub Desktop.
Install Ruby from Source on Ubuntu 14.04
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
>> sudo apt-get update | |
# Install node if you don't already have it | |
>> sudo apt-get install nodejs | |
# Install dependencies | |
>> sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
# Find the version of ruby you want from the Ruby FTP: ftp://ftp.ruby-lang.org/pub/ruby | |
# Install ruby to /usr/local/bin (using v 2.1.2) | |
# Note that v. 2.1.2 fixes an issue regarding readline.c dependency | |
# When installing prior versions of Ruby, if you have readline errors while compiling, | |
# see https://gist.github.com/mislav/a18b9d7f0dc5b9efc162 and apply the patch | |
>> cd # Install from /home/[USER] directory | |
>> wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | |
>> tar -xzvf ruby-2.1.2.tar.gz | |
>> cd ruby-2.1.2/ | |
>> ./configure | |
>> make | |
>> sudo make install | |
# If ruby -v does not return the latest version | |
>> export PATH=/usr/local/bin:$PATH | |
# Tell Rubygems not to install the documentation for each package locally | |
>> echo "gem: --no-ri --no-rdoc" > ~/.gemrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment