简体   繁体   English

Rails和Ubuntu报告不同的ruby版本

[英]Rails and Ubuntu reporting different ruby versions

I use Vagrant and Chef to create new servers when I am developing. 开发时,我使用Vagrant和Chef创建新服务器。 I want to start out on Ruby on Rails so I am setting up a server. 我想从Ruby on Rails开始,所以我要设置服务器。 Everything is working but Ubuntu and Rails are reporting different Ruby versions. 一切正常,但是Ubuntu和Rails报告了不同的Ruby版本。

Ubuntu 12.04: ruby -v = ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] Ubuntu 12.04:ruby -v = ruby​​ 1.9.3p0(2011-10-30修订版33570)[x86_64-linux]
Rails = 1.8.7 (x86_64-linux) Rails = 1.8.7(x86_64-linux)

I don't want Ruby 1.8.7 on the system at all but I can't get rid of it. 我根本不想在系统上使用Ruby 1.8.7,但我无法摆脱它。 Is there anyway to set a default Ruby version? 无论如何,有没有设置默认的Ruby版本?

I don't want top use RVM or similar. 我不想使用RVM或类似的东西。

try this aptitude purge ruby 试试这个aptitude purge ruby

and then install the latest version or the version you want 然后安装最新版本或所需的版本

came across this post in stackoverflow How do I make Ruby 1.9 the default Ruby on Ubuntu? 在stackoverflow中碰到了这篇文章。 如何使Ruby 1.9成为Ubuntu上的默认Ruby?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM