1

我试着这样做

gem uninstall sqlite3-ruby
gem uninstall sqlite3

然后我表演find ~/ | grep mkmf.log

它删除了我在系统上的所有 sqlite3 目录。

但它仍然在我的垃圾箱里。有人知道删除 sqlite3 的更专业的方法吗?

我这样说是因为我已经处理这个错误五天了:

sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** extconf.rb failed ***

我现在已经彻底破坏了我的服务器三遍,并一次又一次地重新安装了每个应用程序和 sqlite3。但它仍然认为它是一个旧标题。

谢谢!

4

2 回答 2

1

Ruby gem 只是“真正的”SQLite 的一个包装器,它是一个库和一个命令行工具。所以删除 gem 不会删除库/cli。您需要使用操作系统提供的任何打包工具来删除它(您没有告诉我们您正在使用哪个操作系统),例如yastoraptpkg...

于 2011-02-15T16:31:40.670 回答
0

我建议您使用rvmbundler管理您的 gem 和 gem 依赖项。我从不在系统范围内安装任何 gems,特别是在 Mac 上,处理系统范围内的 gems 会变得非常混乱。

启动和启动 rvm + bundler 很容易。

首先,安装 rvm(你必须有 git)。

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
# this will be installed on your $HOME/.rvm directory

设置 rvm

echo "source $HOME/.rvm/scripts/rvm" >> $HOME/.bash_profile
source "$HOME/.rvm/scripts/rvm" 

然后,通过 rvm 安装你的 ruby

rvm install ree # Ruby Enterprise Edition or,
# rvm install 1.9.2
# rvm install 1.8.7

切换到你的 ruby​​ 编译器

rvm use ree

创建您的 gemset 以轻松切换到不同的 gem 版本。

rvm gemset create rails3 # where rails3 is the gemset name

使用你的宝石

rvm use ree@rails3

安装捆绑器

gem install bundler # without sudo

创建一个 Gemfile 并安装你的 gem。

mkdir myproject
cd myproject
bundle init # this will create a Gemfile
echo "gem 'rails'" >> Gemfile
echo "gem 'sqlite3-ruby', :require => 'sqlite3'" >> Gemfile
bundle install

关于您的原始帖子,如果它是系统安装,您可以通过运行来检查它which sqlite3_ruby,如果它返回,/usr/bin/sqlite3_ruby那么您应该sudogem uninstall命令之前添加。

于 2011-02-15T17:00:16.053 回答