Compile and install ruby-1.8.6-p114 under Ubuntu8.04

Source: Internet
Author: User
Environment: Ubuntu8.041. install build tool sudoaptitudeinstallbuild-essential tiallinux-headers-$ (uname-r) 2. Install readlinezliblibncurses5apt-getinstallzlib1g-devapt-getinstalllibreadline5libreadline5-devapt-ge

Environment: Ubuntu8.04

1. Install the build tool
Sudo aptitude install build-essential linux-headers-$ (uname-r)

2. Install readline zlib libncurses5
Apt-get install zlib1g-dev
Apt-get install libreadline5 libreadline5-dev
Apt-get install libncurses5 libncurses5-dev

3. Install ruby
Download ruby source code:
Http://www.ruby-lang.org/en/downloads/

Wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p114.tar.gz
Tar xvfz ruby-1.8.6-p114.tar.gz
Cd ruby-1.8.6-p114
./Configure -- prefix =/usr/local/ruby
Sudo make
Sudo make install

After installation, add/usr/local/ruby/bin to the path environment variable of the operating system.

Edit/etc/environment
Gedit/etc/environment

Add:
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/ruby/bin"

Run the following command to make the environment variable modification take effect:

Source/etc/environment

4. Install gem
Wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz
Tar xzvf rubygems-1.0.1.tgz
Cd rubygems-1.0.1
Sudo ruby setup. rb

Verify that the gem is successfully installed and upgraded
Sudo gem update -- system

5. Install rails
Sudo gem install rails -- include-dependencies
After installing rails, verify whether the installation is successful. Run the following command:

Rails-v
Check the rails version.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.