after i installed ruby from the ruby 1.9.2 package i got :: r@ubuntu:/$ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
HOW COME ??
i need 1.9.2 … how do i get it ??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have another version of ruby installed on the system. The way that *nix determines what command you are trying to run when you execute a command without specifying the directory is using the $PATH environment variable. You can see which version of ruby your system is loading by running
which ruby. If, for example, you got/bin/rubyand you installed ruby 1.9.2 to/usr/local/bin/ruby, you probably have/binin your $PATH before you have/usr/local/bin/.To resolve the problem, you can run
export PATH=/usr/local/bin/:$PATHand test it. Once you determine that this resolves your problem, you should add that command to your ~/.bashrc file so you don’t need to manually type it every time. After you save the ~/.bashrc file, you will need to reload it by either opening a new prompt, or runningsource ~/.bashrc.