fesplugas/typus — Issue #317: Nil Object Error 
Author: samrose
Created: 2011-10-25 20:09:08+00:00
State: open

After setting up, running migrations, I am getting this error:

Started GET "/admin/admin_users/edit/1" for 127.0.0.1 at 2011-10-25 16:03:28 -0400
Processing by Admin::AdminUsersController#edit as HTML
Parameters: {"id"=>"1"}
AdminUser Load (0.2ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1
AdminUser Load (0.3ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = ? LIMIT 1 [["id", "1"]]
Rendered helpers/admin/base/_flash_message.html.erb (0.1ms)
Rendered admin/resources/_edit.html.erb (0.0ms)
Rendered admin/resources/_form_javascripts.html.erb (0.0ms)
Rendered helpers/admin/resources/_errors.html.erb (0.0ms)
Rendered admin/templates/_string.html.erb (0.5ms)
Rendered admin/templates/_string.html.erb (0.4ms)
Rendered admin/templates/_selector.html.erb (0.9ms)
Rendered admin/templates/_string.html.erb (0.4ms)
Rendered admin/templates/_password.html.erb (0.4ms)
Rendered admin/templates/_password.html.erb (0.4ms)
Rendered admin/templates/_selector.html.erb (0.8ms)
Rendered admin/templates/_boolean.html.erb (0.5ms)
Rendered admin/resources/_form.html.erb (19.9ms)
Rendered admin/resources/edit.html.erb within layouts/admin/base (25.5ms)
Completed 500 Internal Server Error in 56ms

ActionView::Template::Error (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]):
34: <% end %>
35:
36:

37: <%= build_sidebar || render("admin/templates/profile_sidebar") %>
38:

39:
40:

app/views/admin/resources/edit.html.erb:37:in `_app_views_admin_resources_edit_html_erb___2455141951588326343_37241220'

Rendered /home/samrose/.rvm/gems/ruby-1.9.2-p290@typustest/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms)
Rendered /home/samrose/.rvm/gems/ruby-1.9.2-p290@typustest/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.2ms)
Rendered /home/samrose/.rvm/gems/ruby-1.9.2-p290@typustest/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (5.3ms)

----------------

Using ruby 1.9.2-p290 and this gem bundle

* actionmailer (3.1.1)
* actionpack (3.1.1)
* activemodel (3.1.1)
* activerecord (3.1.1)
* activeresource (3.1.1)
* activesupport (3.1.1)
* acts_as_list (0.1.4)
* ansi (1.3.0)
* arel (2.2.1)
* bcrypt-ruby (3.0.1)
* builder (3.0.0)
* bundler (1.0.21)
* coffee-rails (3.1.1)
* coffee-script (2.2.0)
* coffee-script-source (1.1.2)
* erubis (2.7.0)
* execjs (1.2.9)
* hike (1.2.1)
* i18n (0.6.0)
* jquery-rails (1.0.16)
* json (1.6.1)
* kaminari (0.12.4)
* mail (2.3.0)
* mime-types (1.17.1)
* multi_json (1.0.3)
* polyglot (0.3.2)
* rack (1.3.5)
* rack-cache (1.1)
* rack-mount (0.8.3)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.1.1)
* railties (3.1.1)
* rake (0.9.2.2)
* rdoc (3.11)
* sass (3.1.10)
* sass-rails (3.1.4)
* sprockets (2.0.3)
* sqlite3 (1.3.4)
* thor (0.14.6)
* tilt (1.3.3)
* treetop (1.4.10)
* turn (0.8.3)
* typus (3.1.4 1b6ab55)
* tzinfo (0.3.30)
* uglifier (1.0.4)

------

Ideas appreciated. Not finding this problem anywhere else. Basically, all pages from typus views throw some variation of the nil error...