HeatWare.net header image
HeatWare.net
TwitterRSSEmail
  • Home
  • Windows
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
  • Linux/Unix
  • Mac
  • Mobile
    • Android
    • iOS
    • Phones (Help / Resources)
  • Software / Programming
    • Free Software
    • Programming – General
    • PHP
    • Ruby/Rails
    • Quality Assurance (QA)
    • Software – General
    • Software Help
    • Databases
  • Cool Websites
  • Other
    • Deals & Bargains
    • News
    • Video Games
    • Hardware
    • Electronics
  • About

11 comments / February 10, 2011 / sood / Linux/Unix, Programming – Ruby/Rails

How to install Ruby 1.8.7 on CentOS 5.5 Linux

Have you tried doing yum install ruby in CentOS 5.5? If you have the default repositories configured, you will notice that it installs the ancient Ruby 1.8.5. Not ready to move up to Ruby 1.9, but would like to install Ruby 1.8.7 – well here is how to do it!

Install Ruby 1.8.7 on CentOS 5.5 (or other distributions)

yum install -y gcc zlib zlib-devel
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p330.tar.gz
tar xvf ruby-1.8.7-p330.tar.gz
cd ruby-1.8.7-p330
./configure --enable-pthread
make
make install

Related Posts

  • How to install PostgreSQL 8.4 on CentOS 5.5
  • How to install RubyGems on Linux (Ubuntu & Other)
  • How to install a FTP server on Linux in 30 seconds
  • Using Linux ‘head’ command to preview a file
  • Ubuntu 9.10 :: Download & install it today!
11 comments… add one
  1. Paul Bourget April 25, 2011, 9:53 am

    The link above did not work for me. The one below did.

    ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p330.tar.gz

  2. sood April 25, 2011, 10:42 pm

    Paul,
    Thanks for the heads-up. I have updated the post with the correct link.

  3. Kat June 6, 2011, 4:16 pm

    Well unfortunately this didn’t work out for me…

    I got this during make install:

    ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./instruby.rb –make=”make” –dest-dir=”” –extout=”.ext” –mflags=”” –make-flags=”” –data-mode=0644 –prog-mode=0755 –installed-list .installed.list –mantype=”doc”
    /bin/sh: ./miniruby: No such file or directory
    make: *** [do-install-nodoc] Error 127

  4. sood June 7, 2011, 3:36 pm

    @Kat – Are you using CentOS 5.5? Can you try going through the steps one more time and let me know if you still see the error?

  5. Jim Morrison August 23, 2011, 4:48 pm

    Nice. Thanks! If only life was always this copy&paste 🙂

  6. dgent September 4, 2011, 1:09 pm

    Even after repeating the steps in centos 5.5 ,it does’t work.I meant I am getting same error like Kat is getting

  7. alainchiasson September 29, 2011, 8:58 am

    This worked in compiling it but it still does not work in the correct path :

    [root@hostname ruby-1.8.7-p330]# ruby -v
    ruby 1.8.5 (2006-08-25) [x86_64-linux]
    [root@hostname ruby-1.8.7-p330]# ./ruby -v
    ruby 1.8.7 (2010-12-23 patchlevel 330) [x86_64-linux]
    [root@hostname ruby-1.8.7-p330]# which ruby
    /usr/local/bin/ruby
    [root@hostname ruby-1.8.7-p330]# which ./ruby
    ./ruby
    [root@hostname ruby-1.8.7-p330]#

  8. jambino April 19, 2012, 2:52 pm

    @alainchiaasson Try running configure with the prefix tag set to the default path. /usr.
    If you’ve ever used pirut or downloaded the rpm from the CentOS repos, then your gems and everything else expect ruby to be in /usr/bin, the libraries in /urr/lib and so on in that fashion.

    The default location specified in the config file is to put everything in /usr/local which will sort of mostly work, but may cause you some grief if you don’t feel like putting in the whole path when running a ruby executable. The fix is as easy as running configure again with the expected prefix location, then make and make install again.

    ./configure –prefix=/usr –enable-shared –enable-pthread
    make && sudo make install

    Best of luck.

  9. glav October 29, 2012, 9:16 pm

    @jambino note that your command uses the wrong character ‘-‘. We need to re-type it ; no copy/paste.

  10. Faron March 9, 2013, 6:42 pm

    Thank you for that piece of guide! It was a breeze walk through a park! In case…the current latest version is

    v.1.9.3 as stable.

    http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz

    just use this url and adjust the version in all lines in command for yum install.

    Cheers

  11. Faron March 9, 2013, 6:44 pm

    and dont forget this command line!

    $ signal-event post-upgrade;
    $ signal-event reboot;

Cancel reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Why You Should Consider Diving Apps
  • How to Buy a Smartphone that Fits Your Budget
  • How to Overcome Frustrating PDF Stress
  • Convert PDF to Word: Easy, Reliable and Quality Conversion
  • PDF to Excel App ­ – A New Way of Handling Tricky Documents

Recent Comments

  • Valarie Walter on Basic Troubleshooting Steps for your Cell Phone
  • John Mists on A Brief History of Android OS
  • syarif on PostgreSQL: How to reload config settings without restarting database
  • Raghu on How to SSH to a server using Ruby – Part I
  • francisco clemente on Basic Troubleshooting Steps for your Cell Phone

Tags

ACSLS Android Bargain Cell Phones Cool Software Cool Websites Databases Deals Ebooks Facebook Free Software G2x Galaxy S5 iOS iPhone Kindle LG Linux Linux/Unix Mac Mobile mysql Office OpenStack OS X PHP Postgres PostgreSQL ruby Samsung Galaxy S6 Shell Smartphones Sun T-Mobile Tips Tips & Tricks Ubuntu Unix Virtualization VMWare Windows Windows 7 Windows 8 Windows Vista Windows XP

Latest Tweet

Follow @HeatwaredotNet

SP
@HeatwaredotNet

  • Why You Should Consider Diving Apps https://t.co/Is41cdUv2I #diving-apps
    about 6 years ago

All Categories

Other Links

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2015 — HeatWare