login community faq
0
2

Hi,

I've followed these instructions to install sqlite3 gem : http://docs.webfaction.com/software/rails.html#installing-sqlite3-ruby from source.

Everything worked fine. But when in my rails application directory i try to "bundle install" to install all gems I get this error :


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Installing sqlite3 (1.3.3) with native extensions
/home/plehoux/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:551:in
`rescue in block in build_extensions': ERROR: Failed to build gem native
extension. (Gem::Installer::ExtensionBuildError)

        /home/plehoux/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
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.

I've installed rvm in my home directory and run ruby 1.9.2 and Gem from ~/.rvm directory.

Any idea?

asked Aug 23 '11 at 01:04

plehoux's gravatar image

plehoux
15

edited Aug 23 '11 at 10:32

seanf's gravatar image

seanf ♦♦
59891220


Solved! The problem was that we needed to set the sqlite3-ruby installation options via "bundle config".

Here is what finally worked:

1
2
bundle config build.sqlite3 --with-sqlite3-include=$HOME/include --with-sqlite3-lib=$HOME/lib --with-sqlite3-dir=$HOME/bin
bundle install

Hope that helps!

answered Aug 23 '11 at 16:20

seanf's gravatar image

seanf ♦♦
59891220

Hi,

You would need to install Sqlite in your home directory as explained here:
http://docs.webfaction.com/software/sqlite.html#installing-sqlite-from-source

You would then need to install sqlite3-ruby using:
http://docs.webfaction.com/software/rails.html#installing-sqlite3-ruby

Hope that helps!

answered Aug 23 '11 at 01:11

neeravk's gravatar image

neeravk ♦♦
14061311

I already did those two steps.

(Aug 23 '11 at 01:17) plehoux plehoux's gravatar image

Can you try using the command: "which sqlite3" and see if it references the binary inside your home directory?

(Aug 23 '11 at 01:27) neeravk ♦♦ neeravk's gravatar image

~/bin/sqlite3 (yes)

(Aug 23 '11 at 10:12) plehoux plehoux's gravatar image

Please try setting LD_LIBRARY_PATH and LD_INCLUDE_PATH when you run your commands, eg:

1
LD_INCLUDE_PATH=$HOME/include LD_LIBRARY_PATH=$HOME/lib <your command here>

answered Aug 23 '11 at 10:39

seanf's gravatar image

seanf ♦♦
59891220

LD_INCLUDE_PATH=$HOME/include LD_LIBRARY_PATH=$HOME/lib bundle install

still give the same error.

(Aug 23 '11 at 11:22) plehoux plehoux's gravatar image

Ok, try this - log out of your current SSH session, log back in, and then run the following commands:

1
2
export GEM_HOME=$HOME/.rvm/gems/ruby-1.9.2-p290/gems/
LD_INCLUDE_PATH=$HOME/include LD_LIBRARY_PATH=$HOME/lib bundle install sqlite3
(Aug 23 '11 at 11:46) seanf ♦♦ seanf's gravatar image

Same error. (tks a lot for your time!) Strangely, if I run "gem install sqlit3-ruby" everything is find.

gem install sqlite3-ruby Fetching: sqlite3-ruby-1.3.3.gem (100%)

Hello! The sqlite3-ruby gem has changed it's name to just sqlite3. Rather than installing sqlite3-ruby, you should install sqlite3. Please update your dependencies accordingly.

Thanks from the Ruby sqlite3 team!

<3 <3 <3 <3

Successfully installed sqlite3-ruby-1.3.3 1 gem installed Installing ri documentation for sqlite3-ruby-1.3.3... Installing RDoc documentation for sqlite3-ruby-1.3.3...

(Aug 23 '11 at 13:21) plehoux plehoux's gravatar image

You're very welcome!

I don't think we're going to be able to resolve this here in the public forum. If you'd like us to investigate this further, please open a support ticket to give us permission to log into your account and run these commands ourselves. In the ticket, be sure to let us know the exact commands you are running, and the directory from which you are running them. We'll then try running them and try to get it working for you.

(Aug 23 '11 at 13:38) seanf ♦♦ seanf's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited