On Sat, Jun 11, 2011 at 2:30 PM, Chad Perrin <code / apotheon.net> wrote:

> 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?
>

Install the "sqlite3-ruby" gem.

      rvm 1.9.2@sequel --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