Project

General

Profile

Actions

Defect #11905

closed

Potential "can't dup NilClass" error in UserPreference

Added by Karim Helal over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hello, we've recently upgraded from 1.4.4 to 2.1.0 and now we get the following error 500 when trying to open up any page:

Connecting to database specified by database.yml
OpenIdAuthentication.store is nil. Using in-memory store.

Started GET "/login?back_url=http%3A%2F%2Fred.nuserv.com%2F" for 217.164.33.239 at 2012-09-21 12:28:37 +0000
Processing by AccountController#login as HTML
  Parameters: {"back_url"=>"http://red.nuserv.com/"}
  Current user: anonymous
  Rendered account/login.html.erb within layouts/base (11079.3ms)
Completed 500 Internal Server Error in 11387ms

ActionView::Template::Error (can't dup NilClass):
    9: <%= favicon %>
    10: <%= stylesheet_link_tag 'jquery/jquery-ui-1.8.21', 'application', :media => 'all' %>
    11: <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
    12: <%= javascript_heads %>
    13: <%= heads_for_theme %>
    14: <%= call_hook :view_layouts_base_html_head %>
    15: <!-- page specific tags -->
  app/models/user_preference.rb:47:in `dup'
  app/models/user_preference.rb:47:in `[]='
  app/models/user_preference.rb:27:in `initialize'
  app/models/user.rb:664:in `new'
  app/models/user.rb:664:in `pref'
  app/helpers/application_helper.rb:1222:in `javascript_heads'
  app/views/layouts/base.html.erb:12:in `_app_views_layouts_base_html_erb___3022056590706844150_38096160'

Any ideas what could be causing this? We are using Ruby 1.9.3 on Ubuntu 12.04.1

Thx.

Actions

Also available in: Atom PDF