# Error on app restart

**URL:** <https://www.ruby-forum.com/t/error-on-app-restart/200533>\
**Category:** Radiant CMS\
**Created:** [December 14, 2010, 6:53pm UTC](https://www.ruby-forum.com/t/error-on-app-restart/200533 "2010-12-14T18:53:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [December 14, 2010, 6:53pm UTC](https://www.ruby-forum.com/t/error-on-app-restart/200533/1 "2010-12-14T18:53:26Z")

</div>

This is driving me a little crazy.

Server - phusion passenger & nginx, running in production mode.  
Extensions installed :

drag\_order  
file\_system\_resources  
mailer  
page\_factory  
page\_parts  
paperclipped  
rbac\_base  
rbac\_page\_edit  
settings  
share\_layouts  
tags  
wym\_editor\_filter

After I restart one of my sites, visits to edit pages in the admin are  
met  
with the following :

ActionView::TemplateError (undefined method `include?’ for nil:NilClass)  
on  
line #26 of  
/home/joel/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/radiant-0.9.1/app/views/admin/pages/\_fields.html.haml:  
23: %a.popup{:href=\> ‘#add\_part\_popup’, :title=\>t(‘add\_part’)}  
24: = image(‘add\_tab’, :alt=\>t(‘add\_part’), :title=\>"")  
25: #pages.pages  
26: = render :partial =\> ‘admin/page\_parts/page\_part’,  
:collection  
=\> @page.parts  
27: = render\_region :parts\_bottom, :locals =\> {:f =\> fields}  
28: - form.edit\_layout\_and\_type do  
29: .set

/home/joel/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/will\_paginate-2.3.11/lib/will\_paginate/finder.rb:168:in  
`method_missing' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:11:in`render’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers.rb:90:in  
`non_haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:11:in`render’  
radiant (0.9.1) app/views/admin/pages/\_fields.html.haml:26:in  
`_run_haml_47home47joel4746rvm47rubies47ree451468467452010460247lib47ruby47gems47146847gems47radiant45046946147app47views47admin47pages47_fields46html46haml_locals_fields_object' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers.rb:343:in`call’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers.rb:343:in  
`capture_haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers.rb:545:in`with\_haml\_buffer’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers.rb:339:in  
`capture_haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:88:in`capture’  
radiant (0.9.1) lib/radiant/admin\_ui/region\_partials.rb:13:in  
`method_missing' radiant (0.9.1) app/views/admin/pages/_fields.html.haml:19:in`\_run\_haml\_47home47joel4746rvm47rubies47ree451468467452010460247lib47ruby47gems47146847gems47radiant45046946147app47views47admin47pages47\_fields46html46haml\_locals\_fields\_object’  
radiant (0.9.1) app/helpers/admin/regions\_helper.rb:6:in `call' radiant (0.9.1) app/helpers/admin/regions_helper.rb:6:in`render\_region’  
radiant (0.9.1) app/views/admin/pages/\_fields.html.haml:6:in  
`_run_haml_47home47joel4746rvm47rubies47ree451468467452010460247lib47ruby47gems47146847gems47radiant45046946147app47views47admin47pages47_fields46html46haml_locals_fields_object' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:11:in`render’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers.rb:90:in  
`non_haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:11:in`render’  
radiant (0.9.1) app/views/admin/pages/edit.html.haml:8:in  
`_run_haml_47home47joel4746rvm47rubies47ree451468467452010460247lib47ruby47gems47146847gems47radiant45046946147app47views47admin47pages47edit46html46haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:204:in`call’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers/action\_view\_mods.rb:204:in  
`form_for' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers.rb:567:in`call’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers.rb:567:in  
`haml_bind_proc' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:210:in`form\_for’  
radiant (0.9.1) app/views/admin/pages/edit.html.haml:7:in  
`_run_haml_47home47joel4746rvm47rubies47ree451468467452010460247lib47ruby47gems47146847gems47radiant45046946147app47views47admin47pages47edit46html46haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers.rb:343:in`call’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers.rb:343:in  
`capture_haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers.rb:545:in`with\_haml\_buffer’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers.rb:339:in  
`capture_haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:88:in`capture’  
radiant (0.9.1) lib/radiant/admin\_ui/region\_partials.rb:13:in  
`method_missing' radiant (0.9.1) app/views/admin/pages/edit.html.haml:6:in`\_run\_haml\_47home47joel4746rvm47rubies47ree451468467452010460247lib47ruby47gems47146847gems47radiant45046946147app47views47admin47pages47edit46html46haml’  
radiant (0.9.1) app/helpers/admin/regions\_helper.rb:6:in `call' radiant (0.9.1) app/helpers/admin/regions_helper.rb:6:in`render\_region’  
radiant (0.9.1) app/views/admin/pages/edit.html.haml:3:in  
`_run_haml_47home47joel4746rvm47rubies47ree451468467452010460247lib47ruby47gems47146847gems47radiant45046946147app47views47admin47pages47edit46html46haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:13:in`render’  
radiant (0.9.1)  
vendor/plugins/haml/rails/./lib/haml/helpers/action\_view\_mods.rb:13:in  
`render' radiant (0.9.1) vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:20:in`process’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/rack/request\_handler.rb:92:in  
`process\_request’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_request\_handler.rb:207:in  
`main\_loop’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/railz/application\_spawner.rb:441:in  
`start\_request\_handler’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/railz/application\_spawner.rb:381:in  
`handle\_spawn\_application’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/utils.rb:252:in  
`safe\_fork’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/railz/application\_spawner.rb:377:in  
`handle\_spawn\_application’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server.rb:352:in  
` **send** ’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server.rb:352:in  
`main\_loop’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server.rb:196:in  
`start\_synchronously’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server.rb:163:in  
`start’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/railz/application\_spawner.rb:222:in  
`start’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/spawn\_manager.rb:253:in  
`spawn\_rails\_application’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server\_collection.rb:126:in  
`lookup\_or\_add’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/spawn\_manager.rb:247:in  
`spawn\_rails\_application’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server\_collection.rb:80:in  
`synchronize’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server\_collection.rb:79:in  
`synchronize’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/spawn\_manager.rb:246:in  
`spawn\_rails\_application’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/spawn\_manager.rb:145:in  
`spawn\_application’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/spawn\_manager.rb:278:in  
`handle\_spawn\_application’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server.rb:352:in  
` **send** ’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server.rb:352:in  
`main\_loop’

/home/joel/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion\_passenger/abstract\_server.rb:196:in  
`start\_synchronously’

I’m stumped. I thought it was the version of will\_paginate I had there  
(2.3.14) so I downgraded to 2.3.11 thinking that would help, and it  
didn’t.  
Has anyone run into this before or have advice on how I might go about  
tracking this down.

Thanks!

- Joel

---

<div class="post-metadata">

**Author:** ![Joel\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@Joel\_O](https://www.ruby-forum.com/u/Joel_O)\
**Post date:** [December 14, 2010, 8:33pm UTC](https://www.ruby-forum.com/t/error-on-app-restart/200533/2 "2010-12-14T20:33:58Z")

</div>

I should also add that after about 30 minutes or so - things start  
working.  
“Magically”.

I am so confused right now.

---

<div class="post-metadata">

**Author:** ![Joel\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@Joel\_O](https://www.ruby-forum.com/u/Joel_O)\
**Post date:** [December 14, 2010, 11:39pm UTC](https://www.ruby-forum.com/t/error-on-app-restart/200533/3 "2010-12-14T23:39:46Z")

</div>

I guess I’m not the only person this has happened to :  
[http://groups.google.com/group/radiantcms/browse\_thread/thread/9148b7ba9af126ee](http://groups.google.com/group/radiantcms/browse_thread/thread/9148b7ba9af126ee)

To clarify it a little more - this is only happening right after I  
restart  
by `touch`ing tmp/restart.txt. As previously mentioned, after a little  
while it sort of “kicks in” so to speak and the error stops occuring.

And to answer Jim’s question from the other thread - these are the gems  
I  
have :

action\_mailer\_tls (1.1.3)  
actionmailer (2.3.9, 2.3.8)  
actionpack (2.3.9, 2.3.8)  
activemodel (3.0.0)  
activerecord (2.3.9, 2.3.8)  
activeresource (2.3.9, 2.3.8)  
activesupport (3.0.0, 2.3.9, 2.3.8)  
after\_commit (1.0.7)  
arel (1.0.1)  
aws-s3 (0.6.2)  
bb-ruby (0.9.3)  
builder (2.1.2)  
capistrano (2.5.19)  
capistrano-ext (1.2.1)  
capistrano\_colors (0.5.2)  
configatron (2.6.3)  
daemons (1.1.0)  
delayed\_job (2.0.3)  
fastthread (1.0.7)  
haddock (0.2.1)  
highline (1.6.1)  
hoptoad\_notifier (2.3.2)  
i18n (0.4.1)  
json (1.4.3)  
lockfile (1.4.3)  
mail (2.2.5)  
memcached (0.19.10)  
mime-types (1.16)  
mysql (2.8.1)  
net-scp (1.0.3)  
net-sftp (2.0.5)  
net-ssh (2.0.23)  
net-ssh-gateway (1.0.1)  
newrelic\_rpm (2.12.3)  
paperclip (2.3.3)  
passenger (2.2.15)  
polyglot (0.3.1)  
rack (1.2.1, 1.1.0)  
radiant (0.9.1)  
rails (2.3.9, 2.3.8)  
rake (0.8.7)  
rdoc (2.5.8)  
RedCloth (4.2.3)  
riddle (1.0.11)  
right\_aws (2.0.0)  
right\_http\_connection (1.2.4)  
rmagick (2.13.1)  
ruby-gmail (0.2.0)  
shared-mime-info (0.1)  
subdomain-fu (0.5.3)  
thinking-sphinx (1.3.18)  
treetop (1.4.8)  
tzinfo (0.3.23)  
will\_paginate (2.3.15)  
xml-simple (1.0.12)  
yamler (0.1.0)

I’m just stumped as to why a line like

= render :partial =\> ‘admin/page\_parts/page\_part’, :collection =\>  
@page.parts

would cause "ActionView::TemplateError (undefined method `include?’ for  
nil:NilClass) "
