1

我以前在我的系统上安装了 ruby​​ 1.8.7。一段时间后我安装了rvm。从那时起,就出现了巨大的混乱。例如,尝试启动 Sinatra 服务器会导致:

/home/yoni/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rack (>= 0) amongst [bundler-1.1.3, faraday-0.8.4, koala-1.5.0, multi_json-1.3.6, multipart-post-1.1.5, rake-0.9.2.2, rubygems-bundler-0.9.0, rvm-1.11.3.3] (Gem::LoadError)

我知道这是安装两个 ruby​​ 的结果,因此有两个 gem 文件的位置,但我不知道如何解决这个问题。我不介意完全删除 ruby​​ 1.8.7,但我想在不破坏任何东西的情况下这样做。

有任何想法吗?

更新:结果dpkg --get-selections | grep ruby是:

libdataobjects-mysql-ruby1.8            install
libdataobjects-postgres-ruby1.8         install
libdataobjects-ruby1.8              install
libdataobjects-sqlite3-ruby1.8          install
libdbd-mysql-ruby               install
libdbd-mysql-ruby1.8                install
libdbd-sqlite3-ruby1.8              install
libdbi-ruby1.8                  install
libdeprecated-ruby1.8               install
libmysql-ruby                   install
libmysql-ruby1.8                install
libopenssl-ruby                 install
libopenssl-ruby1.8              install
libruby1.8                  install
libruby1.9.1                    deinstall
libsqlite3-ruby                 install
libsqlite3-ruby1.8              install
ruby-dev                    install
ruby1.8-dev                 install
4

1 回答 1

4
apt-get --purge remove packagename 

dkpg --list | grep ruby从不在下面列表中显示的所有内容中:

rvm requirements

Additional Dependencies:
# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:
  ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config

如果 CLI 无法实现,请使用 synaptic 包管理器:

https://help.ubuntu.com/community/SynapticHowto

于 2012-10-03T16:57:17.693 回答