Forum: Ruby on Rails UserEngine: stack level too deep

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2ae55f9578262d07b3ff8b0fea7f1bf1?d=identicon&s=25 Ean (Guest)
on 2005-12-02 13:34
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: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
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-12-02 13:44
(Received via mailing list)
This is a known problem with Edge Rails - I'm investigating it now.

- james
2ae55f9578262d07b3ff8b0fea7f1bf1?d=identicon&s=25 Ean (Guest)
on 2005-12-02 19:30
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....
E48d29dc8fedb2878fa518d41cc63d88?d=identicon&s=25 Jan Prill (Guest)
on 2005-12-12 19:59
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
5ceea097a3b29cb6a5da6705926410f4?d=identicon&s=25 Gerret Apelt (Guest)
on 2005-12-12 21:55
(Received via mailing list)
This should get you rolling with edgerails:

http://opensvn.csie.org/rails_engines/branches/edge_engines
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 unknown (Guest)
on 2005-12-12 23:01
(Received via mailing list)
On Fri, 2 Dec 2005, James Adam 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
===============================================================================
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2005-12-12 23:16
(Received via mailing list)
Hm.

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

Never seen this happening.
Strange.

Kent.
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2005-12-12 23:44
(Received via mailing list)
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
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 Lou Vanek (Guest)
on 2005-12-13 00:47
(Received via mailing list)
>ruby -v
ruby 1.8.4 (2005-12-01) [i386-cygwin]

no problems.
This topic is locked and can not be replied to.