Md.Muktadir
Md.Muktadir

Reputation: 31

How to update ruby from 1.9.3 to 2.3.1 in ubuntu 14.04 32 bit?

Now, I am using ubuntu 14.04 32 bit OS. I have previously installed ruby 1.9.3 and now I am trying to install ruby 2.3.1 using "rbenv install -v 2.3.1". When I ran this it is say successfully installed. But when I am running "ruby -v" it showing ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]. What should I do to update my ruby now???

Upvotes: 2

Views: 2605

Answers (2)

vinoth
vinoth

Reputation: 155

I too had that problem before, but now I solved it. Try the following steps:

  1. Add the ppa:brightbox/ruby-ng repository:

    $ sudo apt-add-repository ppa:brightbox/ruby-ng
    $ sudo apt-get update
    
  2. Install the package:

    $ sudo apt-get install ruby2.3 ruby2.3-dev
    
  3. And you’re up and running:

    $ ruby2.3 -v
    
    ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux-gnu]
    

Upvotes: 1

Md. Farhan Memon
Md. Farhan Memon

Reputation: 6121

Reference

  • Open the terminal
  • From menu-bar, select Edit > Profiles
  • In opened prompt Edit > Default
  • In Tab "Title & Commands" -> check "Run Command as Login Shell"
  • Restart Terminal

Now this makes it your default setup and need not login after restart.

Hope it helps.

Upvotes: 0

Related Questions