0
當我嘗試運行以下命令時,從ActiveRecord返回錯誤,指出未找到連接器。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的寶石破碎,或者是初始代碼不正確?
確實。謝謝。 – nickcharlton 2010-02-26 12:10:41
謝謝!血腥的事情是不可能發現! – 2013-09-07 17:46:13