# UserEngine: stack level too deep

**URL:** <https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306>\
**Category:** Rails\
**Created:** [December 2, 2005, 1:34pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306 "2005-12-02T13:34:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 2, 2005, 1:34pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/1 "2005-12-02T13:34:46Z")

</div>

Hi,

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  
db:  
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](http://localhost:3000/users/list)  
“Action Controller: Exception caught”  
stack level too deep

I’m using EdgeRails on WinXP SP2 PgSQL 8.1

Cheers,  
Ean

PS: Here’s the trace:

#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/validations.rb:682:in  
`|' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:682:in `write\_inheritable\_set’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/validations.rb:240:in  
`validate_on_create' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:379:in `send’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/validations.rb:379:in  
`validates_presence_of' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:378:in `each’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/validations.rb:378:in  
`validates_presence_of' D:/rails/dammit-core/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:16:in `included’  
D:/rails/dammit-core/vendor/plugins/login\_engine/lib/login\_engine/authenticated\_user.rb:9:in  
`class_eval' D:/rails/dammit-core/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:9:in `class\_eval’  
D:/rails/dammit-core/vendor/plugins/login\_engine/lib/login\_engine/authenticated\_user.rb:9:in  
`included' D:/rails/dammit-core/vendor/plugins/user_engine/app/models/user.rb:29:in `include’  
D:/rails/dammit-core/vendor/plugins/user\_engine/app/models/user.rb:29  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:237:in  
`load' #{RAILS_ROOT}/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:237:in `load’  
#{RAILS\_ROOT}/vendor/plugins/engines/lib/dependencies\_extensions.rb:45:in  
`require_or_load' #{RAILS_ROOT}/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:30:in `depend\_on’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:36:in  
`associate_with' #{RAILS_ROOT}/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:209:in `require\_association’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:209:in  
`require_association' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations.rb:780:in `require\_association\_class’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/associations.rb:650:in  
`has_and_belongs_to_many_without_reflection' (eval):5:in `has\_and\_belongs\_to\_many’  
(…  
…  
many many many times …  
…)  
(eval):5:in `has\_and\_belongs\_to\_many’  
#{RAILS\_ROOT}/app/controllers/application.rb:8

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 2, 2005, 1:44pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/2 "2005-12-02T13:44:46Z")

</div>

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

- james

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 12, 2005, 7:59pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/3 "2005-12-12T19:59:58Z")

</div>

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?

regards  
Jan

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 12, 2005, 9:55pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/4 "2005-12-12T21:55:42Z")

</div>

This should get you rolling with edgerails:

[http://opensvn.csie.org/rails\_engines/branches/edge\_engines](http://opensvn.csie.org/rails_engines/branches/edge_engines)

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 12, 2005, 11:01pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/5 "2005-12-12T23:01:55Z")

</div>

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  
too  
deep). right now all i know is that it’s related to rail’s method of  
hacking  
const\_missing and multiple file loads where those files do  
‘alias\_method’.

## -a

# =============================================================================== | 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

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 2, 2005, 7:30pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/6 "2005-12-02T19:30:59Z")

</div>

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

Hmmm…

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 12, 2005, 11:16pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/7 "2005-12-12T23:16:57Z")

</div>

Hm.

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

Never seen this happening.  
Strange.

Kent.

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 12, 2005, 11:44pm UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/8 "2005-12-12T23:44:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@ean](https://www.ruby-forum.com/u/ean)\
**Post date:** [December 13, 2005, 12:47am UTC](https://www.ruby-forum.com/t/userengine-stack-level-too-deep/49306/9 "2005-12-13T00:47:28Z")

</div>

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

no problems.
