petehamilton / citier

CITIER (Class Inheritance & Table Inheritance Embeddings for Rails) is a solution for simple Multiple Class Inheritance in Rails.
88 stars 24 forks source link

Citier will not allow a migration for me. #47

Open wmarbut opened 12 years ago

wmarbut commented 12 years ago

Hi, I can't get Citier to let me migrate. When I run

bundle exec rake db:migrate --trace

I get

-- create_view("view_authors", "SELECT people.id, type,first_name,middle_name,last_name,suffix,birth_date,gender,self_perms,other_perms,created_at,updated_at,admin FROM people, authors WHERE p
eople.id = authors.id")
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `create_view' for #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x007ff46b484c40>

I thought this

undefined method `create_view' 

Might be caused by not having rails_sql_views in my gemfile, but when I add it I get a different error. That error is

undefined method `tables' for class `ActiveRecord::ConnectionAdapters::PostgreSQLAdapter'

This occurs even though I don't use PostgreSQL at all. This second issue is also documented at this address https://github.com/aeden/rails_sql_views/issues/7

ianpetzer commented 12 years ago

This is a duplicate of issue 41.

You need to add the 'rails_sql_views' gem to your project

wmarbut commented 12 years ago

@ianpetzer Thanks Peter. Adding the rails_sql_views gem just creates another error for me unfortunately as I documented in my original post.

caseol commented 12 years ago

I'm running over the same problem and I realized that rails_sql_views plugin doesn't have a mysql2 adapter: https://github.com/aeden/rails_sql_views/tree/master/lib/rails_sql_views/connection_adapters

shuebner commented 11 years ago

The same error still exists. For me the following solution worked for completing the migration. add the following to your gemfile (note the specific git source, since morgz and mremolt both did not work for me):

gem 'rails_sql_views', git: 'git://github.com/centresource/rails_sql_views'