UserEngine: stack level too deep


I’m trying to get the UserEngine running.
I have installed the LoginEngine, added the essential lines to
environment.rb / application.rb and application_helper.rb.
Worked fine.
Then I did the same with the UserEngine and when trying to set up the
rake engine_migrate ENGINE=user
I get:
Migrating engine ‘user_engine’
rake aborted!
stack level too deep

But… the db-tables seem to created right. And I tried:
rake bootstrap
with the same result:
rake aborted!
stack level too deep

Same when I browse to http://localhost:3000/users/list
“Action Controller: Exception caught”
stack level too deep

I’m using EdgeRails on WinXP SP2 PgSQL 8.1


PS: Here’s the trace:

|' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:682:inwrite_inheritable_set’
validate_on_create' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:379:insend’
validates_presence_of' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:378:ineach’
validates_presence_of' D:/rails/dammit-core/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:16:inincluded’
class_eval' D:/rails/dammit-core/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:9:inclass_eval’
included' D:/rails/dammit-core/vendor/plugins/user_engine/app/models/user.rb:29:ininclude’
load' #{RAILS_ROOT}/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:237:inload’
require_or_load' #{RAILS_ROOT}/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:30:independ_on’
associate_with' #{RAILS_ROOT}/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:209:inrequire_association’
require_association' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations.rb:780:inrequire_association_class’
has_and_belongs_to_many_without_reflection' (eval):5:inhas_and_belongs_to_many’

many many many times …
(eval):5:in `has_and_belongs_to_many’

This is a known problem with Edge Rails - I’m investigating it now.

  • james

james.adam wrote:

This is a known problem with Edge Rails - I’m investigating it now.

  • james

Hi, James,

I’ve just tried my first steps with engines. There is still a Problem
with EdgeRails. Have you found out anything about it?


This should get you rolling with edgerails:

On Fri, 2 Dec 2005, James A. wrote:

This is a known problem with Edge Rails - I’m investigating it now.

  • james

if any of the rails developers are reading this - i’ve determined that
ruby-1.8.4 crashes even the most basic rails app in the same way (stack
deep). right now all i know is that it’s related to rail’s method of
const_missing and multiple file loads where those files do


| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| – bodhicaryavatara

james.adam wrote:

This is a known problem with Edge Rails - I’m investigating it now.

Ok. I could install LoginEngine with GemRails.
But bootstrapping failed with UserEngine.
It did finally work when I changed the type of the omnipotent row from
boolean to int2 in postgres, and added
guest.omnipotent = false and user.omnipotent = false
to the rake task (without, postgres complained because of the not-NULL
contraint violation).

But it still doesn’t work. At first I got “Rails app. failed to start
properly” all the time, after clearing all caches, cookies, tmps and the
engine_files dir in /public, i do now get:

NoMethodError in User#login
You have a nil object when you didn’t expect it!
The error occured while evaluating nil.type_oid



$ ruby -v
ruby 1.8.4 (2005-12-12) [i686-linux]

Never seen this happening.


Once we can really, truly see Rails 1.0 a-comin’ round the mountain
(and I get my PhD viva out of the way) I’ll merge the fixes into the
trunk engines plugin, plus make the swathe of bugfixes that Nathaniel
has been uncovering with PostgreSQL…

  • james

ruby -v
ruby 1.8.4 (2005-12-01) [i386-cygwin]

no problems.