Sequel question: Where's SQLite?

So . . . I need to get the Sequel gem working with SQLite on a Debian
system, with Ruby 1.8. I have the sqlite3 package installed from APT,
and I have Sequel installed from gems. What I also have is an error
when
I try to “require ‘sequel’” and “DB = Sequel.sqlite”:

/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': LoadError: no such file to load -- sqlite3
(Sequel::AdapterNotFound)

What am I missing?

On Sat, Jun 11, 2011 at 2:30 PM, Chad P. [email protected] wrote:

Install the “sqlite3-ruby” gem.

 ☣ rvm [email protected] --create
 ☣ gem install sequel
Fetching: sequel-3.24.1.gem (100%)
Successfully installed sequel-3.24.1
1 gem installed
Installing ri documentation for sequel-3.24.1...
Installing RDoc documentation for sequel-3.24.1...
 ☣ irb
001 > require "rubygems"
 => false
002 > require "sequel"
 => true
003 > DB = Sequel.sqlite
Sequel::AdapterNotFound: LoadError: no such file to load -- sqlite3
<snip>
004 > exit
 ☣ gem install sqlite3-ruby
Fetching: sqlite3-1.3.3.gem (100%)
Building native extensions.  This could take a while...
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-1.3.3
Successfully installed sqlite3-ruby-1.3.3
2 gems installed
Installing ri documentation for sqlite3-1.3.3...
Installing ri documentation for sqlite3-ruby-1.3.3...
Installing RDoc documentation for sqlite3-1.3.3...
Installing RDoc documentation for sqlite3-ruby-1.3.3...
 ☣ irb
001 > require "sequel"
 => true
002 > DB = Sequel.sqlite
 => #<Sequel::SQLite::Database: "sqlite:/">
003 > puts "Success!"
Success!
 => nil
004 > exit

On Sat, Jun 11, 2011 at 2:55 PM, Mike M. [email protected] wrote:

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.

Of course, if I had read this message first I would have said to install
the
“sqlite3” gem… :slight_smile:

Never mind. I ended up just using the Ruby Sequel library in APT.

I finally figured out why Debian keeps making APT packages for things
that are already managed by gems.

On Sun, Jun 12, 2011 at 05:57:42AM +0900, Mike M. wrote:

“sqlite3” gem… :slight_smile:
Thanks. However . . .

> gem install sqlite3
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.8 extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search 

path (the
location where your sqlite3 shared library is located).
*** 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.

Where the heck is mkmflog?

. . . I ask as I wait for updatedb to finish.

On Sat, Jun 11, 2011 at 11:42 PM, Chad P. [email protected] wrote:

or ‘yum install sqlite3-devel’ and check your shared library search path (the
location where your sqlite3 shared library is located).
*** 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.

You did install the SQLite3 dev package for Debian, yes?

Where the heck is mkmflog?

Usually in the gem’s directory where it would’ve ended up if it had
been built successfully.


Phillip G.

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
– Leibnitz

I think you have to install sqlite3-dev package. The message says
sqlite3.h
is missing.

2011/6/11 Chad P. [email protected]

On Sun, Jun 12, 2011 at 07:34:57AM +0900, Gunther D. wrote:

I think you have to install sqlite3-dev package. The message says sqlite3.h
is missing.

Hmm . . .

Yeah, that’s probably the case, now that you mention it. I’ve been
spoiled by working on other platforms where development tools tend to be
available by default. I’ll have to try to remember this for next time,
since I’d already given up on the gem and started using the APT package
for Ruby Sequel.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs