Curious erros

After I run a simple program like this:

require ‘rubygems’
require ‘active_record’

ActiveRecord::Base.establish_connection(
:adapter => “sqlite3”,
:dbfile => “D:\sqlite\crawl.config”
)
class Webdata < ActiveRecord::Base

end

web=Webdata.find(1)
puts web.dns

I see such a message.What had happend?When I use mysql,there is no
problem.Is there any problem when I install ruby?This sqlite3 adpt is
the default one in activerecord gem.
thanks.

ruby webs.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- sqlite3 (MissingSourceFile) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:495:in require' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:342:innew_constants_in’
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:495:in require' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/core_ext/kernel/requires.rb:7:inrequire_library_or_gem’
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/core_ext/kernel/requires.rb:5:inrequire_library_or_gem’
from c:/ruby/lib/ruby/site_ruby/1.8/active_record/connection_adapters/
sqlite_adapter.rb:14:in sqlite3_connection' from c:/ruby/lib/ruby/site_ruby/1.8/active_record/connection_adapters/ abstract/connection_specification.rb:262:insend’
from c:/ruby/lib/ruby/site_ruby/1.8/active_record/connection_adapters/
abstract/connection_specification.rb:262:in
connection_without_query_cache=' from c:/ruby/lib/ruby/site_ruby/1.8/active_record/query_cache.rb: 54:inconnection=’
from c:/ruby/lib/ruby/site_ruby/1.8/active_record/connection_adapters/
abstract/connection_specification.rb:230:in retrieve_connection' from c:/ruby/lib/ruby/site_ruby/1.8/active_record/connection_adapters/ abstract/connection_specification.rb:78:inconnection’
from c:/ruby/lib/ruby/site_ruby/1.8/active_record/base.rb:1023:in
find_one' from c:/ruby/lib/ruby/site_ruby/1.8/active_record/base.rb:1014:infind_from_ids’
from c:/ruby/lib/ruby/site_ruby/1.8/active_record/base.rb:419:in
`find’
from aa.rb:12


(MissingSourceFile)
active_support/core_ext/kernel/requires.rb:7:in
c:/ruby/lib/ruby/site_ruby/1.8/active_record/connection_adapters/
abstract/connection_specification.rb:230:in retrieve_connection'find’
from aa.rb:12

Exit code: 1

You need to install the ruby bindings to sqlite3. One way to do that
would
be installing the sqlite3-ruby gem.

HTH,

Felix

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