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

Uninitialized Constant error during Rake #11

Open mutuelinvestor opened 13 years ago

mutuelinvestor commented 13 years ago

I have been using citier on a project of mine and have run into a problem.

When I run rake db:migrate to on my migration files, rake is aborting. From what I can tell, its having problems with the create_citier_view( ) command.

As I look at the --trace version of the rake command, I see the table being created, but then it throws the following error:

rake aborted! uninitialized constant Wager::Writable /[path]/lib/citier/core._ext.rb:33:in 'create_citier_view'.

I went and looked at the source, but really can't figure out what the issue is. I believe I have everything configured per your user guide, so I'm not sure what the problem is.

petehamilton commented 13 years ago

Hi, thanks for sending your source code.

I see you are using postgres, I know it might be a pain but could you try with sqlite for me and see if the problem persists? I am currently on a machine without pg installed and you know your code/setup better than I do.

mutuelinvestor commented 13 years ago

I'll try that this evening and let you know how it comes out. Thanks again.

On Tue, Jun 14, 2011 at 1:15 PM, PeterHamilton < reply@reply.github.com>wrote:

Hi, thanks for sending your source code.

I see you are using postgres, I know it might be a pain but could you try with sqlite for me and see if the problem persists? I am currently on a machine without pg installed and you know your code/setup better than I do.

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1367588

petehamilton commented 13 years ago

No worries :)

On 14/06/2011 20:31, "mutuelinvestor" reply@reply.github.com wrote:

I'll try that this evening and let you know how it comes out. Thanks again.

On Tue, Jun 14, 2011 at 1:15 PM, PeterHamilton < reply@reply.github.com>wrote:

Hi, thanks for sending your source code.

I see you are using postgres, I know it might be a pain but could you try with sqlite for me and see if the problem persists? I am currently on a machine without pg installed and you know your code/setup better than I do.

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1367588

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1368587

mutuelinvestor commented 13 years ago

Hi Peter:

I ran into all sorts of problems getting Sqlite3 install last night. Hopefully I will figure it out today and get back to citier.

As you looked at the code that I sent you, is it safe to assume you didn't see any glaring errors in what I did.

I'll be in touch.

Thanks Jim

On Tue, Jun 14, 2011 at 3:35 PM, PeterHamilton < reply@reply.github.com>wrote:

No worries :)

On 14/06/2011 20:31, "mutuelinvestor" reply@reply.github.com wrote:

I'll try that this evening and let you know how it comes out. Thanks again.

On Tue, Jun 14, 2011 at 1:15 PM, PeterHamilton < reply@reply.github.com>wrote:

Hi, thanks for sending your source code.

I see you are using postgres, I know it might be a pain but could you try with sqlite for me and see if the problem persists? I am currently on a machine without pg installed and you know your code/setup better than I do.

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1367588

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1368587

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1368613

mutuelinvestor commented 13 years ago

Peter:

At long last, I got SQLite3 installed. Apparently, something had corrupted my gcc, but once I reinstalled xcode I has all set.

With Sqlite installed I got back to the Citier project and now have a question.

Do I need to get all the models set up and then run rake db:migrate once or is it possible to do it on a serial basis. The reason I ask is that the first time I ran rake db:migrate Citier did everything as expected. However, the next time, after adding to the overall model, I ran it I got the same uninitialized constant Object Name:Writable. Which as I think about it was the same thing that happened under Postgres.

Thanks,

Jim

On Wed, Jun 15, 2011 at 5:19 AM, James Mundy mutuelinvestor@gmail.comwrote:

Hi Peter:

I ran into all sorts of problems getting Sqlite3 install last night. Hopefully I will figure it out today and get back to citier.

As you looked at the code that I sent you, is it safe to assume you didn't see any glaring errors in what I did.

I'll be in touch.

Thanks Jim

On Tue, Jun 14, 2011 at 3:35 PM, PeterHamilton < reply@reply.github.com>wrote:

No worries :)

On 14/06/2011 20:31, "mutuelinvestor" reply@reply.github.com wrote:

I'll try that this evening and let you know how it comes out. Thanks again.

On Tue, Jun 14, 2011 at 1:15 PM, PeterHamilton < reply@reply.github.com>wrote:

Hi, thanks for sending your source code.

I see you are using postgres, I know it might be a pain but could you try with sqlite for me and see if the problem persists? I am currently on a machine without pg installed and you know your code/setup better than I do.

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1367588

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1368587

Reply to this email directly or view it on GitHub: https://github.com/PeterHamilton/citier/issues/11#issuecomment-1368613

pisaruk commented 13 years ago

Hello Peter,

I am facing the same problem during the rake migration task. Do you have any news on this issue? I would really appreciate to use your gem because I do need to be able to work with multiple inheritance on my models.

Thanks in advance.

greyblake commented 13 years ago

I've got the same. I use SQLite3, have not tried with PostgreSQL.

DouweM commented 13 years ago

Same problem here, I'm using MySQL/mysql2. Never mind, it works now! Without thinking, I had added the create_citier_view bit to my root table as well.

ianpetzer commented 13 years ago

I just ran into this issue. The problem was that I hadn't included acts_as_citier on my subclass

kureck commented 12 years ago

same problem here. any hints?

blakeanderson commented 12 years ago

Also, make sure your child models are inheriting from the parent class, and not from ActiveRecord. That one got me.

noisecapella commented 12 years ago

I had this problem when running my migrations, and it was because I was using create_citier_view on the base class instead of the current class