为什么我找不到表格错误?
?> >> User.connection.execute("select * from users where rownum = 1")
=> //successful result
?> >> User.first
DEPRECATION WARNING: the object returned from `select_all` must respond to `column_types`. (called from first at C:0)
ActiveRecord::JDBCError: Table users does not exist
class User < ActiveRecord::Base
establish_connection 'db1'
alias_attribute(:site_type_id, :'SITE_TYPE#ID')
end
答案 0 :(得分:1)
好的,发现问题...... ActiveRecord不喜欢ojdbc驱动程序jar。一旦我从OJDBC切换到OracleEnhanced适配器就可以了!