LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-29-2011, 09:14 AM   #1
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Rep: Reputation: Disabled
Check which version of Ruby is installed?


How can I check which version of Ruby is installed on my CentOS 5.6 server?
 
Old 09-29-2011, 09:22 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Code:
ruby -v
Like this:
Code:
~$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
ciao,
jdk
 
Old 09-29-2011, 10:30 AM   #3
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks, that worked.

Code:
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
This seems to be out of date and unpatched. What can I do to remedy it?
 
Old 09-29-2011, 11:08 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
You haven't told anyone what distro you're using so I can't really say. Use your package manager (aptitude, yum or something else) and download the latest package. How do you update your machine in general?
jdk
 
Old 02-18-2013, 10:50 AM   #5
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
doesn't work for me

I'm pretty sure I have removed all vestiges of ruby from my system but "ruby -v" returns misinformation

Code:
root@irvken:/home/sean# ruby -v
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]
when there is no ruby installed!
 
Old 02-18-2013, 01:50 PM   #6
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by irvken View Post
I'm pretty sure I have removed all vestiges of ruby from my system but "ruby -v" returns misinformation

Code:
root@irvken:/home/sean# ruby -v
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]
when there is no ruby installed!
Type in terminal
Code:
which ruby
to see where ruby is.

Might be you think you got it but did not.

Last edited by jkirchner; 02-18-2013 at 01:52 PM.
 
Old 02-18-2013, 03:56 PM   #7
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
Code:
root@irvken:/home/sean# which ruby
/usr/local/bin/ruby
Is it ok to just delete /usr/local/bin/ruby ?
 
Old 02-18-2013, 11:33 PM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
what does the following command return?
Code:
aptitude search ruby1.9.3
If the ruby package is marked with an "i" (for installed) then you can try removing it with
Code:
sudo aptitude remove ruby1.9.3
But the fact that ruby is found in /usr/local/bin suggests that it wasn't installed via a package.
jdk
 
Old 02-19-2013, 03:57 AM   #9
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
ok it's not installed , what does the v stand for?

Someone else suggested I must have compiled a copy of ruby (which is probable), can I just delete the binary then?
 
Old 02-19-2013, 11:42 PM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
From the Aptitude guide:
Code:
i	-	the package is installed and all its dependencies are satisfied.
c	-	the package was removed, but its configuration files are still present.
p	-	the package and all its configuration files were removed, or the package was never installed.
v	-	the package is virtual.
B	-	the package has broken dependencies.
u	-	the package has been unpacked but not configured.
C	-	half-configured: the package's configuration was interrupted.
H	-	half-installed: the package's installation was interrupted.
As you can see, the v-flag stands for "virtual".

Yes, /usr/local/bin is the normal location for things you have compiled yourself. It should be safe to remove it.
jdk
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check if the GNU make installed and the version? thomas2004ch Linux - Software 8 04-13-2011 09:24 AM
How to check the installed mod_jk version thomas2004ch Linux - Newbie 3 03-04-2010 03:42 AM
check installed software version using rpm cccc Red Hat 2 11-22-2008 04:54 PM
Check Version of Installed Red Hat dwarf007 Linux - General 2 01-08-2006 07:51 PM
Simple Newb Question: How do I check what version of Redhat is Installed from the CLI praefex Linux - General 1 01-27-2004 07:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration