Matt Westlake
Matt Westlake

Reputation: 3651

ActiveRecord table does not exist error

Why am I getting a table not found error?

?> >> 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

Upvotes: 1

Views: 533

Answers (1)

Matt Westlake
Matt Westlake

Reputation: 3651

Ok, found the issue... ActiveRecord doesn't like the ojdbc driver jar. As soon as I switched from OJDBC to the OracleEnhanced adapter it worked!

Upvotes: 1

Related Questions