开发者

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]

after i i开发者_JAVA技巧nstalled 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 ??


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/ruby and you installed ruby 1.9.2 to /usr/local/bin/ruby, you probably have /bin in your $PATH before you have /usr/local/bin/.

To resolve the problem, you can run export PATH=/usr/local/bin/:$PATH and 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 running source ~/.bashrc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜