apt - How do I upgrade to Ruby 2.2 on my Ubuntu system? - Ask Ubuntu


i’m using ubuntu linux. below uname info

myuser@myinstance:~$ uname -a linux myinstance 3.18.0-52-generic #123-ubuntu smp fri feb 19 14:27:58 utc 2016 x86_64 x86_64 x86_64 gnu/linux 

i’m trying upgrade version of ruby on machine, installed at

/usr/lib/ruby/1.9.1 

i tried following advice here — install ruby 2.2.3 via apt, unfortunately error, “alternative path /usr/bin/ruby2.2 doesn't exist”. right way upgrade system use ruby 2.2 or greater?

myuser@myinstance:~/racertracks$ sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby2.2 400 \ >  --slave /usr/bin/rake rake /usr/bin/rake2.2 \ >  --slave /usr/bin/ri ri /usr/bin/ri2.2 \ >  --slave /usr/bin/rdoc rdoc /usr/bin/rdoc2.2 \ >  --slave /usr/bin/gem gem /usr/bin/gem2.2 \ >  --slave /usr/bin/irb irb /usr/bin/irb2.2 \ >  --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby2.2.1.gz \ >  --slave /usr/share/man/man1/rake.1.gz rake.1.gz /usr/share/man/man1/rake2.2.1.gz \ >  --slave /usr/share/man/man1/ri.1.gz ri.1.gz /usr/share/man/man1/ri2.2.1.gz \ >  --slave /usr/share/man/man1/rdoc.1.gz rdoc.1.gz /usr/share/man/man1/rdoc2.2.1.gz \ >  --slave /usr/share/man/man1/gem.1.gz gem.1.gz /usr/share/man/man1/gem2.2.1.gz \ >  --slave /usr/share/man/man1/irb.1.gz irb.1.gz /usr/share/man/man1/irb2.2.1.gz update-alternatives: error: alternative path /usr/bin/ruby2.2 doesn't exist 

why not use ruby 2.3 available in repositories

sudo apt update sudo apt-get install ruby2.3 ruby2.3-dev

or try ruby 2.4

you can 1 via brightbox ppa

1) add repository

sudo apt-add-repository ppa:brightbox/ruby-ng sudo apt-get update 

2) install

sudo apt-get install ruby2.4

alternatively try reverse hacking error alternative path /usr/bin/ruby2.2 doesn't exist creating sudo mkdir /usr/bin/ruby2.2 , trying again.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User