LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 10: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, 10:22 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

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, 11: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, 12:08 PM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

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, 11: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, 02:50 PM   #6
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Posts: 766

Rep: Reputation: 196Reputation: 196
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 02:52 PM.
 
Old 02-18-2013, 04: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-19-2013, 12:33 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

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, 04: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-20-2013, 12:42 AM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:24 AM
How to check the installed mod_jk version thomas2004ch Linux - Newbie 3 03-04-2010 04:42 AM
check installed software version using rpm cccc Red Hat 2 11-22-2008 05:54 PM
Check Version of Installed Red Hat dwarf007 Linux - General 2 01-08-2006 08: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 08:30 PM


All times are GMT -5. The time now is 04:13 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration