【发布时间】:2011-03-28 04:09:57
【问题描述】:
我在我的 macbook (OS X 10.5) 上安装了较新版本的 SQLite3 (3.7.0.1),但 'sqlite3 --version' 给了我系统上的旧版本:
$ sqlite3 --version
3.4.0
我想我希望这个版本会被覆盖,但事实并非如此。任何人都可以提示我吗?非常感谢,现在我正在尝试开始使用 Rails,但我收到了这个错误:
$ sudo gem install sqlite3-ruby
Password:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for #include <sqlite3.h>
... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_initialize()... no
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
奇怪的是,自从安装了新版本的 sqlite3 后,这个错误就消失了(换句话说,sqlite3-ruby 安装成功)——但 sqlite3 仍然指向 3.4.0,我检查了我的 $PATH 中的目录和它们只包含 3.7.0.1
提前感谢您的帮助。
【问题讨论】: