From: jhs408@... Date: 2009-04-17T00:10:07+09:00 Subject: Ruby sqlite/gem error: Could not load sqlite adapter The sample "c:\tmp'Test_sqlite.rb" generates the error: Could not load sqlite adapter, Yet, when the example is executed in the sqlite3-ruby directory, no error occur. Any suggestion or changes to the sample to resolve the error. Thanks for the help, John ------------------------------------ Windows XP SP3 Using ruby 1.8.7, gem 1.3.2, sqlite3-ruby 1.2.4, sqlite3 product Environment set: RUBYOPT=rubygems PATH=c:\tools\sqlite3 ... -----running sample----> c:\tmp\test_sqlite.rb -------------- require 'sequel' DB = Sequel.sqlite("test-sequel.db") # create an items table DB.create_table :items do primary_key :id column :name, :text column :price, :float end # create a dataset from the items table items = DB[:items] # populate the table items << {:name => 'abc', :price => rand * 100} items << {:name => 'def', :price => rand * 100} items << {:name => 'ghi', :price => rand * 100} # print out the number of records puts "Item count: #{ items.count }" # print out the records in descending order by price items.reverse_order(:price).print # print out the average price puts "The average price is: #{ items.avg :price }" ------Error Msg---- C:\tmp>test_sequel.rb C:/ruby/lib/ruby/gems/1.8/gems/sequel-2.11.0/lib/sequel_core/ database.rb:105:in `adapter_class': Could not load sqlite a dapter: (Sequel::Error::AdapterNotFound) no such file to load -- sqlite3 from C:/ruby/lib/ruby/gems/1.8/gems/sequel-2.11.0/lib/ sequel_core/database.rb:141:in `connect' from C:/ruby/lib/ruby/gems/1.8/gems/sequel-2.11.0/lib/ sequel_core.rb:68:in `connect' from C:/ruby/lib/ruby/gems/1.8/gems/sequel-2.11.0/lib/ sequel_core.rb:157:in `adapter_method' from (eval):1:in `sqlite' from C:/tmp/test_sequel.rb:7