Problem with has_many_polymorphs plugin

I installed has_many_polymorphs plugin in a freshly generated Radiant
application. Then I generated a simple Person-Disk-Book example models
(with script/generate extension_model), declared the polymorphic
associations as explained in many plugin tutorials, and put some test
data into the database. Then I get this strange behavior in the
script/console:

xonmac:~/Development/labs/radiant/mycms skozlov$ ./script/console
Loading development environment.
has_many_polymorphs: has_many_polymorphs: Rails environment detected

b = Book.find :first
=> #<Book:0x3456f48 @attributes={“id”=>“1”}>

b.people
NoMethodError: undefined method people' for #<Book:0x3456f48 @attributes={"id"=>"1"}> from /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/base.rb:1860:inmethod_missing’
from (irb):2

p = Person.find :first
=> #<Person:0x3411d08 @attributes={“id”=>“1”}>

b.people
=> []

To wrap it up: the “Book” class doesn’t have the “people” method defined
until I do the a “find” on class Person. After that all works normally.
Direct associations (Person -> Book/Disk) work always fine.

This problem is not reproducible with a “normal” Rails application. In
case of any interest, I will be willing to put the whole application
source tree somewhere on the Internet.

I would appreciate any help with fixing this issue.

Hi,

if i create a vanilla radiant app using the styled blog and an empty
mysql database (though postgres displays the same problem) i get the
following trace when i try to delete an article. Also when going to
the front page each article body has

stack level too deep
SystemStackError: stack level too deep: SELECT * FROM page_parts
WHERE (page_parts.page_id = 6) AND (page_parts.name = ‘extended’)
LIMIT 1

Normal rails applications have no issues.

Any one have any ideas?

Thanks

Mark kirby

Rendered admin/page/_node (0.01905)
ArchivePage Columns (0.006102) SHOW FIELDS FROM pages
SQL (0.000967) SELECT count() AS count_all FROM pages WHERE
(pages.parent_id = 4)
Page Load (0.001191) SELECT * FROM pages WHERE (pages.id = 1)
Page Load (0.001439) SELECT * FROM pages WHERE (pages.parent_id
= 4) ORDER BY virtual DESC, title ASC
ArchiveMonthIndexPage Columns (0.006044) SHOW FIELDS FROM pages
SQL (0.002736) SELECT count(
) AS count_all FROM pages WHERE
(pages.parent_id = 10)
Page Load (0.000000) SystemStackError: stack level too deep:
SELECT * FROM pages WHERE (pages.id = 4)

ActionView::TemplateError (SystemStackError: stack level too deep:
SELECT * FROM pages WHERE (pages.id = 4) ) on line #29 of admin/
page/_node.rhtml:
26: <%= icon %>
27: <%= title %>
28: <% else -%>
29: <%= expander %><a href="<%= page_edit_url(:id => page) %

" title="<%= page.url %>"><%= icon %> <%= title %>
30: <%= page_type %>
31: <%= spinner %>
32: <% end -%>

 /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/

activerecord/lib/active_record/connection_adapters/
abstract_adapter.rb:128:in log' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/connection_adapters/mysql_adapter.rb: 243:inexecute’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:
399:in select' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/connection_adapters/abstract/ database_statements.rb:7:inselect_all’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/base.rb:427:in find_by_sql' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/base.rb:997:infind_every’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/base.rb:1028:in find_one' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/base.rb:1014:infind_from_ids’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/base.rb:419:in find' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/belongs_to_association.rb: 44:infind_target’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/associations/association_proxy.rb:
131:in load_target' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/association_proxy.rb: 55:inreload’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/associations.rb:891:in parent' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/models/page.rb: 232:inparent?’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/models/page.rb:
79:in url' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/views/admin/ page/_node.rhtml:29:in_run_rhtml_47usr47pkg47lib47ruby47gems47146847gems47radiant45046646247a
pp47views47admin47page47_node46rhtml’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:326:in send' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:326:incompile_and_render_template’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:301:in render_template' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:260:inrender_file’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:275:in render' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/partials.rb:59:inrender_partial’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/benchmarking.rb:26:in benchmark' /usr/pkg/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/pkg/lib/ruby/1.8/benchmark.rb:307:in realtime' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:26:inbenchmark’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/partials.rb:58:in render_partial' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:287:inrender’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/helpers/admin/
page_helper.rb:4:in render_node' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/views/admin/ page/_node.rhtml:46:in_run_rhtml_47usr47pkg47lib47ruby47gems47146847gems47radiant45046646247a
pp47views47admin47page47_node46rhtml’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/associations/association_proxy.rb:
123:in each' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/association_proxy.rb: 123:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/associations/association_proxy.rb:
123:in method_missing' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/has_many_association.rb: 98:inmethod_missing’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/views/admin/
page/_node.rhtml:44:in
_run_rhtml_47usr47pkg47lib47ruby47gems47146847gems47radiant45046646247a pp47views47admin47page47_node46rhtml' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:326:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:326:in compile_and_render_template' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:301:inrender_template’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:260:in render_file' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:275:inrender’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/partials.rb:59:in render_partial' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:26:inbenchmark’
/usr/pkg/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/pkg/lib/ruby/1.8/benchmark.rb:307:inrealtime’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/benchmarking.rb:26:in benchmark' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/partials.rb:58:inrender_partial’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:287:in render' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/helpers/admin/ page_helper.rb:4:inrender_node’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/views/admin/
page/_node.rhtml:46:in
_run_rhtml_47usr47pkg47lib47ruby47gems47146847gems47radiant45046646247a pp47views47admin47page47_node46rhtml' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/association_proxy.rb: 123:ineach’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/associations/association_proxy.rb:
123:in send' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/association_proxy.rb: 123:inmethod_missing’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activerecord/lib/active_record/associations/has_many_association.rb:
98:in method_missing' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/views/admin/ page/_node.rhtml:44:in_run_rhtml_47usr47pkg47lib47ruby47gems47146847gems47radiant45046646247a
pp47views47admin47page47_node46rhtml’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:326:in send' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:326:incompile_and_render_template’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:301:in render_template' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:260:inrender_file’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:275:in render' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/partials.rb:59:inrender_partial’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/benchmarking.rb:26:in benchmark' /usr/pkg/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/pkg/lib/ruby/1.8/benchmark.rb:307:in realtime' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:26:inbenchmark’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/partials.rb:58:in render_partial' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:287:inrender’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/helpers/admin/
page_helper.rb:4:in render_node' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/views/admin/ page/index.rhtml:15:in_run_rhtml_47usr47pkg47lib47ruby47gems47146847gems47radiant45046646247a
pp47views47admin47page47index46rhtml’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:326:in send' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:326:incompile_and_render_template’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_view/base.rb:301:in render_template' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:260:inrender_file’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/base.rb:806:in render_file' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/base.rb:711:inrender_with_no_layout’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/layout.rb:247:in
render_without_benchmark' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:50:inrender’
/usr/pkg/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:50:inrender’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/base.rb:1096:in
perform_action_without_filters' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/filters.rb:632:incall_filter’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/filters.rb:634:in call_filter' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/filters.rb:638:incall_filter’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/filters.rb:438:in call' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/filters.rb:637:incall_filter’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/filters.rb:638:in call_filter' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/filters.rb:438:incall’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/filters.rb:637:in call_filter' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/filters.rb:638:incall_filter’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/filters.rb:438:in call' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/filters.rb:637:incall_filter’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/filters.rb:619:in
perform_action_without_benchmark' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:66:inperform_action_without_rescue’
/usr/pkg/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:66:inperform_action_without_rescue’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/rescue.rb:83:in perform_action' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/base.rb:430:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/base.rb:430:in
process_without_filters' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/filters.rb:624:inprocess_without_session_management_support’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/session_management.rb:114:in
process_without_test' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/test_process.rb:15:inprocess’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
actionpack/lib/action_controller/base.rb:330:in process' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ railties/lib/dispatcher.rb:41:indispatch’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/
rails.rb:78:in process' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ rails.rb:76:insynchronize’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/
rails.rb:76:in process' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb: 618:inprocess_client’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:
617:in each' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb: 617:inprocess_client’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:
736:in run' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb: 736:ininitialize’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:
736:in new' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb: 736:inrun’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:
720:in initialize' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb: 720:innew’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:
720:in run' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:271:inrun’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/
configurator.rb:270:in each' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:270:inrun’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:
127:in run' /usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ command.rb:211:inrun’
/usr/pkg/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activesupport/lib/active_support/dependencies.rb:488:in load' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activesupport/lib/active_support/dependencies.rb:488:inload’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activesupport/lib/active_support/dependencies.rb:342:in
new_constants_in' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activesupport/lib/active_support/dependencies.rb:488:inload’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
railties/lib/commands/servers/mongrel.rb:60
/usr/pkg/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/pkg/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activesupport/lib/active_support/dependencies.rb:495:in require' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
/usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
activesupport/lib/active_support/dependencies.rb:495:in require' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ railties/lib/commands/server.rb:39 /usr/pkg/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/pkg/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3

On 19 Sep 2007, at 14:05, John W. Long wrote:

Mark K. wrote:

stack level too deep
SystemStackError: stack level too deep: SELECT * FROM page_parts
WHERE (page_parts.page_id = 6) AND (page_parts.name = ‘extended’)
LIMIT 1

Any one have any ideas?

Do tests run for you?

The 1st block of tests all pass, on the second block i get one error:

  1. Error:
    test_index__with_cookie(Admin::PageControllerTest):
    ActionView::TemplateError: stack level too deep
    On line #29 of admin/page/_node.rhtml
 26:           <%= icon %>
 27:           <%= title %>
 28: <% else -%>
 29:           <%= expander %><a href="<%= page_edit_url(:id =>

page) %>" title="<%= page.url %>"><%= icon %> <%= title %>
30: <%= page_type %>
31: <%= spinner %>
32: <% end -%>

Mark K.

stack level too deep
SystemStackError: stack level too deep: SELECT * FROM page_parts
WHERE (page_parts.page_id = 6) AND (page_parts.name = ‘extended’)
LIMIT 1

Do you have any extensions installed? They could be breaking
things. If not, It could actually be that the stack level is
too deep. Your system might have a low stack size limit.

The following will show how deep your ruby stack can go:

ruby -e ‘$x=0;def r;$x+=1;r;end;r rescue puts $x’;

My system can go 5050 levels.

Ruby relies on the system limit on the C stack to limit
its own stack. ulimit -s will show your current stack
limit. My system has a limit of 8192.

Radiant uses up more of the stack than a vanilla rails app
(as it processes through the normal rails stack and then its
own libs).

Dan.

Mark K. wrote:

stack level too deep
SystemStackError: stack level too deep: SELECT * FROM page_parts
WHERE (page_parts.page_id = 6) AND (page_parts.name = ‘extended’)
LIMIT 1

Any one have any ideas?

Do tests run for you?


John L.
http://wiseheartdesign.com

On 20 Sep 2007, at 00:47, Daniel S. wrote:

The following will show how deep your ruby stack can go:

ruby -e ‘$x=0;def r;$x+=1;r;end;r rescue puts $x’;

That command doesn’t work for me

My system can go 5050 levels.

Ruby relies on the system limit on the C stack to limit
its own stack. ulimit -s will show your current stack
limit. My system has a limit of 8192.

i set ulimit -s 8192 and it runs fine now. Thanks i’ve been banging
my head for days over this one.

Mark K.