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

undefined method `create_view' #41

Open ftheo opened 12 years ago

ftheo commented 12 years ago

When trying to follow something similar to example with MySQL version 5.5.17 with Rails 3.1 I get the following error

== CreateBooks: migrating ==================================================== -- create_table(:books) -> 0.0073s citier -> Root Class citier -> table_name -> master_objects citier -> Non Root Class citier -> table_name -> books citier -> tablename (view) -> view_books -- create_view("view_books", "SELECT master_objects.id, info,type,created_at,updated_at,title,created_at,updated_at FROM master_objects, books WHERE master_objects.id = books.id") rake aborted! An error has occurred, all later migrations canceled:

undefined method `create_view' for #CreateBooks:0x007f8e3ca00c40

ulitiy commented 12 years ago

+1 That's a problem with rails_sql_views gem, but it's not clear what to do now to use citier

ulitiy commented 12 years ago

Try gem 'rails_sql_views', git: 'https://github.com/morgz/rails_sql_views.git' in your gemfile and require 'rails_sql_views' in your environment.rb (as it's mentioned in citier gemspec)

fregas commented 12 years ago

That fixed my issue. Going to see if I continue to have others with rails 3.2, but looks pretty awesome so far.

Sivli-Embir commented 12 years ago

Fixed my issue (well this Issue #32 did, same idea though). If this will not be fixed soon you many want to add this to the README. Thanks for the great gem!