Results 1 to 9 of 9

Thread: how do i install ruby 1.9.2

  1. #1
    Join Date
    Dec 2009
    Beans
    254

    Question how do i install ruby 1.9.2

    How do i compile and install ruby 1.9.2 on ubuntu?

  2. #2
    Join Date
    Feb 2008
    Beans
    143

    Re: how do i install ruby 1.9.2

    Hello,



    get the latest stable version from http://www.ruby-lang.org/en/downloads/


    Code:
    wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
    lets extract it

    Code:
    tar -xvvf ruby-1.9.2-p0.tar.gz
    enter the Freshly extracted file
    Code:
     
    cd ruby-*
    Now look for a file called README or INSTALL and read it for install instructions.

    In my case i had to run this..

    Code:
    ./configure
    make
    install 
    sudo make install
    PS: When i did it i ran into dependency hell with zlib and gems however i'm running jaunty on an _unconventional_ system. So tell me if you get the same problem (or any others) and I'll try and help you fix it.
    Last edited by trigsenior; August 27th, 2010 at 07:39 PM. Reason: added PS

  3. #3
    Join Date
    Jan 2009
    Beans
    Hidden!
    Distro
    Kubuntu 8.10 Intrepid Ibex

    Re: how do i install ruby 1.9.2

    Thanks for the info, even if I didn't start this thread, but how can I install it in a different folder than ruby 1.9.1?

  4. #4
    Join Date
    Oct 2007
    Beans
    74

    Re: how do i install ruby 1.9.2

    Quote Originally Posted by kyonides View Post
    Thanks for the info, even if I didn't start this thread, but how can I install it in a different folder than ruby 1.9.1?
    Code:
    ./configure --prefix=/YOUR/NEW/DIRECTORY
    Might I also suggest that in the ruby community, using rvm is the preferred way of installing ruby.

  5. #5
    Join Date
    Sep 2010
    Beans
    6

    Re: how do i install ruby 1.9.2

    Quote Originally Posted by sharpdust View Post
    Code:
    ./configure --prefix=/YOUR/NEW/DIRECTORY
    Might I also suggest that in the ruby community, using rvm is the preferred way of installing ruby.
    While I greatly appreciate all the hard work that's gone into RVM it's never worked for me. I tried it on OS X and it randomly lost connection to what version it was on. This happened not once but three times.

    I always assume I did something wrong when something stops working on my computer because, you know, I'm the one doing stuff, but in the most obvious case of RVM-WTF-itus all I did was run a simple ruby script that was nothing more than setting some local variables and puts'ing them out to the console; one second it worked then literally the next second it didn't. Ruby page faulted and wouldn't even run anymore. I thought, "Wow, did I do something in my script?" But no, it was just a demo from a website tutorial showing how to use arrays and hashes. Nothing fancy or system mucking about-ish.

    Now I've just tried using it on Ubuntu 10.04 server. I wanted to install ruby 1.9.2 and rails 3.0.0 but when it was all installed rails couldn't be found even though it was listed in "gem list". I've given up on RVM for now and am just going to try installing everything myself manually.

    I guess the whole point of my long winded rant is to point out saying, "Use RVM" is a bit like saying "Can't see? Rub camel dung in your eye, that always helps me." Plus I don't live near any camels, the dragons ate them all.

  6. #6
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: how do i install ruby 1.9.2

    Camel dung is actually a good remedy for panther pis s in your eyes. And if the panther was close enough to only pis s in your eyes--consider yourself lucky.

    RVM worked for me under Hardy. Haven't tried it under Jaunty.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  7. #7
    Join Date
    May 2010
    Beans
    73

    Re: how do i install ruby 1.9.2

    (note: I am on 10.04) I wrote this guide to remind me how, from back when I was testing the 1_9_3dev branch (now defunct)
    Code:
    how to install a new ruby manually:
    
    bash
        export BV=1.9.3dev
        autoconf
        ./configure --with-ruby-version=$BV --prefix=/usr --program-suffix=$BV
        make
        sudo make install
    
        sudo update-alternatives \
            --install /usr/bin/ruby ruby /usr/bin/ruby$BV ${BV//./""} \
            --slave   /usr/bin/erb  erb  /usr/bin/erb$BV \
            --slave   /usr/bin/irb  irb  /usr/bin/irb$BV \
            --slave   /usr/bin/rdoc rdoc /usr/bin/rdoc$BV \
            --slave   /usr/bin/ri   ri   /usr/bin/ri$BV
        sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem$BV ${BV//./""}
        sudo update-alternatives --config ruby
        sudo update-alternatives --config gem
    exit
    
    if you have troubles with --program-suffix and sub programs (ri, gem, etc), try replacing relevant lines with:
        ./configure --with-ruby-version=$BV --prefix=/usr
        make
        sudo make install
        sudo ruby -e 'Dir.glob("bin/*") do |fh| %x(mv #{fh} /usr/bin/#{fh}#{ENV["BV"]}); end'
        sudo mv /usr/bin/ruby /usr/bin/ruby$BV
    Last edited by roberto.tomas; September 8th, 2010 at 12:28 AM.
    «If I've seen very far, it's only because I was that desperate to leave.»
    robisinho : mi colección de música : favoritas recientes

  8. #8
    Join Date
    Jan 2009
    Beans
    Hidden!
    Distro
    Kubuntu 8.10 Intrepid Ibex

    Re: how do i install ruby 1.9.2

    Quote Originally Posted by sharpdust View Post
    Code:
    ./configure --prefix=/YOUR/NEW/DIRECTORY
    Might I also suggest that in the ruby community, using rvm is the preferred way of installing ruby.
    I'm sorry but it didn't help me since it still installed a lot of the components in the following folders...

    installing binary commands: /usr/lib/ruby/1.9.2/bin
    installing base libraries: /usr/lib/ruby/1.9.2/lib
    installing arch files: /usr/lib/ruby/1.9.2/lib/ruby/1.9.1/i686-linux
    installing extension objects: /usr/lib/ruby/1.9.2/lib/ruby/1.9.1/i686-linux
    installing extension objects: /usr/lib/ruby/1.9.2/lib/ruby/site_ruby/1.9.1/i686-linux
    installing extension objects: /usr/lib/ruby/1.9.2/lib/ruby/vendor_ruby/1.9.1/i686-linux
    installing extension headers: /usr/lib/ruby/1.9.2/include/ruby-1.9.1/i686-linux
    installing extension scripts: /usr/lib/ruby/1.9.2/lib/ruby/1.9.1
    installing extension scripts: /usr/lib/ruby/1.9.2/lib/ruby/site_ruby/1.9.1
    installing extension scripts: /usr/lib/ruby/1.9.2/lib/ruby/vendor_ruby/1.9.1
    installing extension headers: /usr/lib/ruby/1.9.2/include/ruby-1.9.1/ruby
    installing rdoc: /usr/lib/ruby/1.9.2/share/ri/1.9.1/system
    installing capi-docs: /usr/lib/ruby/1.9.2/share/doc/ruby
    installing command scripts: /usr/lib/ruby/1.9.2/bin
    installing library scripts: /usr/lib/ruby/1.9.2/lib/ruby/1.9.1
    installing common headers: /usr/lib/ruby/1.9.2/include/ruby-1.9.1
    installing manpages: /usr/lib/ruby/1.9.2/share/man/man1
    installing default gems: /usr/lib/ruby/1.9.2/lib/ruby/gems/1.9.1 (cache, doc, gems, specifications)
    which wasn't what I tried to do here...

  9. #9
    Join Date
    Oct 2007
    Beans
    74

    Re: how do i install ruby 1.9.2

    Quote Originally Posted by kyonides View Post
    I'm sorry but it didn't help me since it still installed a lot of the components in the following folders...



    which wasn't what I tried to do here...
    Where are you intending to install it? The 1.9.1 stuff exist there for comparability reasons, see the FAQ on this page.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •