当我尝试运行以下命令时,我从 ActiveRecord 收到一条错误消息,指出尚未找到连接器。
require 'activerecord'
ActiveRecord::Base.establish_connection(
:adaptor => "sqlite3",
:database => "db.sqlite3"
)
错误信息:
>> ActiveRecord::Base.establish_connection("adaptor" => "sqlite3-ruby")
ActiveRecord::AdapterNotSpecified: database configuration does not specify
adapter from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/
gems/activerecord/2.2.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:64:in `establish_connection'
ActiveRecord gem 是否损坏,或者初始代码是否不正确?