开发者

How do you completely remove 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 f开发者_开发知识库ive 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!


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...


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜