Sunday, May 5, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 549  / 2 Years ago, fri, april 1, 2022, 1:33:22

I have installed ruby1.8 and ruby1.8-dev packages but it doesnt respond to the ruby command at the command line.



ruby
The program 'ruby' is currently not installed. You can install it by typing:
sudo apt-get install ruby
irb
The program 'irb' is currently not installed. You can install it by typing:
sudo apt-get install ruby


I am just a little concernted that installing ruby will install a different version.


More From » installation

 Answers
0

I can only recommend removing the repository rubies and install it via RVM (Ruby Version Manager AFAIK). This will also allow you to have several versions installed, should you ever need that.



bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session." >> .bashrc


Then RVM should be installed. Close current terminal and reopen, in order to reload the bash profile. Ruby can now easily be installed by typing



rvm install 1.9.2  #Replace with whatever version you'd like (1.8.7, ree etc.)
rvm --default 1.9.2


This will also install rubygems, and the alias commands for you.



Since none of these commands should be sudo'ed, you will not experience permission problems with gems later on either :-)



Edit: To answer the last question, installing "ruby" from apt will install ruby1.8 too. It's even the same version, but with links fixed. You could just do a



sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby


to fix the links :-)


[#43612] Saturday, April 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
strhen

Total Points: 27
Total Questions: 111
Total Answers: 103

Location: Angola
Member since Tue, Apr 25, 2023
1 Year ago
strhen questions
Sun, Jun 6, 21, 04:57, 3 Years ago
Tue, Mar 1, 22, 12:44, 2 Years ago
Wed, Jul 21, 21, 14:38, 3 Years ago
;