gem install sqlite3-ruby Error

188 views
Skip to first unread message

ChadW

unread,
Jul 24, 2010, 1:59:37 AM7/24/10
to sqlite3-ruby
I am trying to install sqlite3-ruby I am running Cent OS 4.5 and RoR
2.3.8

I realize that its been said in here before that the gem sqlite3-ruby
only supports sqlite3.6.16+ My install of CentOS has version 3.3.6

I presume I have to some how update sqlite but I have been searching
on google and I can't find anyway to do it. I tried: yum install
sqlite but it just tells me:


Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: serverbeach1.fedoraproject.org
Excluding Packages in global exclude list
Finished
Setting up Install Process
Package sqlite-3.3.6-5.x86_64 already installed and latest version
Package sqlite-3.3.6-5.i386 already installed and latest version
Nothing to do


Can anyone help me? I think this the root cause of my my RoR app will
not load and keeps giving me the message:

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it
shortly.



Thanks for your help :)

Luis Lavena

unread,
Jul 24, 2010, 2:47:16 AM7/24/10
to sqlite...@googlegroups.com
On Sat, Jul 24, 2010 at 2:59 AM, ChadW <aeb...@gmail.com> wrote:
> I am trying to install sqlite3-ruby  I am running Cent OS 4.5 and RoR
> 2.3.8
>
> I realize that its been said in here before that the gem sqlite3-ruby
> only supports sqlite3.6.16+  My install of CentOS has version 3.3.6
>
> I presume I have to some how update sqlite but I have been searching
> on google and I can't find anyway to do it.  I tried: yum install
> sqlite but it just tells me:
>

You can try the following: compile sqlite3 as static library, install
somewhere in your home directory and then provide that option for the
gem install process

Download http://www.sqlite.org/sqlite-amalgamation-3.6.23.1.tar.gz

(in the sqlite3 source)
./configure --disable-shared --enable-static --prefix=/some/path/in/my/home

gem install sqlite3-ruby -- --with-sqlite3-dir=/some/path/in/my/home

Maybe that works?
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Chad Warren

unread,
Jul 24, 2010, 3:33:29 AM7/24/10
to sqlite...@googlegroups.com
I followed your instructions and I received the following when I ran: gem install sqlite3-ruby -- --with-sqlite3-dir=/home/iamchad/sqlite/sqlite-3.6.23.1


root@scooter [/home/iamchad/sqlite/sqlite-3.6.23.1]# gem install sqlite3-ruby -- --with-sqlite3-dir=/home/iamchad/sqlite/sqlite-3.6.23.1
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb --with-sqlite3-dir=/home/iamchad/sqlite/sqlite-3.6.23.1
checking for 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.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby
        --with-sqlite3-dir
        --with-sqlite3-include
        --without-sqlite3-include=${sqlite3-dir}/include
        --with-sqlite3-lib
        --without-sqlite3-lib=${sqlite3-dir}/lib
        --with-sqlite3lib
        --without-sqlite3lib


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out


Any other thoughts?


Chad

Luis Lavena

unread,
Jul 24, 2010, 3:46:06 AM7/24/10
to sqlite...@googlegroups.com
On Sat, Jul 24, 2010 at 4:33 AM, Chad Warren <aeb...@gmail.com> wrote:
I followed your instructions and I received the following when I ran: gem install sqlite3-ruby -- --with-sqlite3-dir=/home/iamchad/sqlite/sqlite-3.6.23.1


root@scooter [/home/iamchad/sqlite/sqlite-3.6.23.1]# gem install sqlite3-ruby -- --with-sqlite3-dir=/home/iamchad/sqlite/sqlite-3.6.23.1
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb --with-sqlite3-dir=/home/iamchad/sqlite/sqlite-3.6.23.1
checking for 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!

Did you compiled 3.6, correct? is sqlite/sqlite-3.6.23.1 the installation directory? (where you make install?)
 
What are the contents of mkmf.log that should be "/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/mkmf.log"

Chad Warren

unread,
Jul 24, 2010, 4:00:38 AM7/24/10
to sqlite...@googlegroups.com
Sorry, I am a liinux noobie.  How do I actually compile and install it?

make install ????


chad

Aaron Patterson

unread,
Jul 24, 2010, 4:14:12 AM7/24/10
to sqlite...@googlegroups.com
On Sat, Jul 24, 2010 at 1:00 AM, Chad Warren <aeb...@gmail.com> wrote:
>
> Sorry, I am a liinux noobie.  How do I actually compile and install it?
> make install ????

`make install` is correct, after you've done a "./configure
--prefix=$HOME/sqlite"
Then do "gem install sqlite3-ruby -- --with-sqlite3-dir=$HOME/sqlite"

So, the commands in full are:

$ tar zxvf sqlite-amalgamation-3.6.23.1.tar.gz
$ cd cd sqlite-3.6.23.1
$ mkdir $HOME/sqlite
$ ./configure --prefix=$HOME/sqlite
$ make && make install
$ sudo gem install sqlite3-ruby -- --with-sqlite3-dir=$HOME/sqlite

Hope that helps.

--
Aaron Patterson
http://tenderlovemaking.com/

Chad Warren

unread,
Jul 24, 2010, 12:19:54 PM7/24/10
to sqlite...@googlegroups.com
Thank you everyone for your assistance.  I got it working now!

Chad
Reply all
Reply to author
Forward
0 new messages