After a new installation, the previous version of SQLite3 (OS X) is preserved

I installed the new version of SQLite3 (3.7.0.1) on my macbook (OS X 10.5), but "sqlite3 --version" gives me the older version I had on my system:

$ sqlite3 --version
3.4.0

I suppose I expected this version to be overwritten, but that doesn't seem to be the case. Can someone tell me? I would really appreciate it, now I'm trying to get started with Rails, but I got this error:

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

Oddly enough, although after installing the new version of sqlite3 this error went away (in other words, sqlite3-ruby was successfully installed), but sqlite3 still points to 3.4.0, I checked the directories in my $ PATH and they only contain 3.7.0.1

Thanks in advance for your help.

+3
2

, hash sqlite3? , , hash .

, . :

    --with-sqlite3-dir 
    --with-sqlite3-include 
    --with-sqlite3-lib 
0

CentOS-. . , ! http://amitava1.blogspot.com/2010/08/ruby-on-rails-on-centos-55-with.html

:

$ wget http://www.sqlite.org/sqlite-amalgamation-3.7.0.1.tar.gz
$ tar xvzf sqlite-amalgamation-3.7.0.1.tar.gz
$ cd sqlite-3.7.0.1
$ ./configure --prefix=/opt/local/sqlite-3.7.0.1
$ make
$ sudo make install
$ sudo /opt/ruby-enterprise-1.8.7-2010.02/bin/gem install sqlite3-ruby -- --with-sqlite3-dir=/opt/local/sqlite-3.7.0.1 
Building native extensions.  This could take a while...
Successfully installed sqlite3-ruby-1.3.1
1 gem installed
0

Source: https://habr.com/ru/post/1759051/


All Articles