UserEngine: stack level too deep


#1

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
“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:inwrite_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:insend’
#{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:ineach’
#{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:inincluded’
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:inclass_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:ininclude’
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:inload’
#{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:independ_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:inrequire_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:inrequire_association_class’
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations.rb:650:in
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’
#{RAILS_ROOT}/app/controllers/application.rb:8


#2

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

  • james

#3

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


#4

This should get you rolling with edgerails:

http://opensvn.csie.org/rails_engines/branches/edge_engines


#5

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


#6

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…


#7

Hm.

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

Never seen this happening.
Strange.

Kent.


#8

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

#9

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

no problems.