如何彻底删除sqlite3?

发布于 2024-10-17 12:24:16 字数 451 浏览 6 评论 0原文

我尝试这样做

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。但它仍然认为它是一个旧标题。

谢谢!

I tried doing this

gem uninstall sqlite3-ruby
gem uninstall sqlite3

Then I performed find ~/ | grep mkmf.log

And it removed any sqlite3 directory I had on the system.

But it still is in my bin. Anyone know a more professional way of removing sqlite3?

I say this because I've been dealing with this error for five days now :

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

I have completely gutted my server three times now and reinstalled every single application and sqlite3 included on to it again and again. But it still thinks its an old header.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

捂风挽笑 2024-10-24 12:24:16

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

The Ruby gem is just a wrapper around the "real" SQLite which is a library plus a command line tool. So removing the gem doesn't remove the library/cli. You need to remove that with whatever packaging tool your operating system provides (you didn't tell us which OS you're using), like yast or apt or pkg...

妄想挽回 2024-10-24 12:24:16

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

搭建并启动 RVM + Bunler 非常简单。

首先,安装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

使用您的 gemset

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 命令。

I recommend that you use rvm and bundler to manage your gems and gem dependencies.
I never install any gems system-wide, specially on a Mac where it can get really messy dealing with system-wide gems.

It's easy to get rvm + bundler up and started.

First, install rvm (you must have git).

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

Setup rvm

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

Then, install your ruby via rvm

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

Switch to your ruby compiler

rvm use ree

Create your gemset to easily switch to different gem versions.

rvm gemset create rails3 # where rails3 is the gemset name

Use your gemset

rvm use ree@rails3

Install bundler

gem install bundler # without sudo

Create a Gemfile and install your gems.

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

About your original post, if it's a system install, you can check it by running which sqlite3_ruby and if it returns /usr/bin/sqlite3_ruby then you should prepend sudo to gem uninstall command.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文