datasektionen/mage — Issue #86: [staging][vouchers#new] NoMethodError: undefined method `default_organ' for nil:NilClass
Author: Ior
Created: 2012-02-29 13:34:33+00:00
State: open

[See this exception on Errbit](http://errbit.datasektionen.se:80/apps/64bafd0c08d5edff9f20a73746f66b56/errs/4f4e23fe27314014f000002c "See this exception on Errbit")

# NoMethodError: undefined method `default_organ' for nil:NilClass #
## Summary ##

### URL ###
[http://mage.staging.datasektionen.se/verifikat/nytt](http://mage.staging.datasektionen.se/verifikat/nytt)"

### Where ###
vouchers#new
### Occured ###
Feb 29 1:11pm
### Similar ###
5
## Params ##
```
{
"action" => "new",
"controller" => "vouchers"
}
```
## Session ##
```
{
"_csrf_token" => "HvakDexEE6VL8/vDfr+cx9msNumAPzWT5qNXRo7ZtaE=",
"session_id" => "55ff8b9a7b5d9c69feaecbc45626bfa7",
"warden_user_user_key" => "[\"User\", [\"2\"], \"\"]"
}
```
## Backtrace ##
```
18: /app/controllers/vouchers_controller.rb -> **new**
4: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal/implicit_render.rb -> **send_action**
150: [GEM_ROOT]/gems/actionpack-3.0.11/lib/abstract_controller/base.rb -> **process_action**
11: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal/rendering.rb -> **process_action**
18: [GEM_ROOT]/gems/actionpack-3.0.11/lib/abstract_controller/callbacks.rb -> **block in process_action**
451: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/callbacks.rb -> **_run__2763786315913515260__process_action__4071302987609571610__callbacks**
410: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/callbacks.rb -> **_run_process_action_callbacks**
94: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/callbacks.rb -> **run_callbacks**
17: [GEM_ROOT]/gems/actionpack-3.0.11/lib/abstract_controller/callbacks.rb -> **process_action**
17: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal/rescue.rb -> **process_action**
30: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal/instrumentation.rb -> **block in process_action**
52: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/notifications.rb -> **block in instrument**
21: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/notifications/instrumenter.rb -> **instrument**
52: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/notifications.rb -> **instrument**
29: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal/instrumentation.rb -> **process_action**
119: [GEM_ROOT]/gems/actionpack-3.0.11/lib/abstract_controller/base.rb -> **process**
41: [GEM_ROOT]/gems/actionpack-3.0.11/lib/abstract_controller/rendering.rb -> **process**
138: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal.rb -> **dispatch**
14: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal/rack_delegation.rb -> **dispatch**
178: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_controller/metal.rb -> **block in action**
62: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb -> **call**
62: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb -> **dispatch**
27: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb -> **call**
148: [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb -> **block in call**
93: [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb -> **block in recognize**
75: [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb -> **optimized_each**
92: [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb -> **recognize**
139: [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb -> **call**
493: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb -> **call**
44: [GEM_ROOT]/gems/oa-core-0.3.2/lib/omniauth/strategy.rb -> **call!**
30: [GEM_ROOT]/gems/oa-core-0.3.2/lib/omniauth/strategy.rb -> **call**
54: [GEM_ROOT]/gems/sass-3.1.14/lib/sass/plugin/rack.rb -> **call**
35: [GEM_ROOT]/gems/warden-1.0.6/lib/warden/manager.rb -> **block in call**
34: [GEM_ROOT]/gems/warden-1.0.6/lib/warden/manager.rb -> **catch**
34: [GEM_ROOT]/gems/warden-1.0.6/lib/warden/manager.rb -> **call**
17: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/best_standards_support.rb -> **call**
14: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/head.rb -> **call**
24: [GEM_ROOT]/gems/rack-1.2.5/lib/rack/methodoverride.rb -> **call**
21: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/params_parser.rb -> **call**
182: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/flash.rb -> **call**
149: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/session/abstract_store.rb -> **call**
302: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/cookies.rb -> **call**
32: [GEM_ROOT]/gems/activerecord-3.0.11/lib/active_record/query_cache.rb -> **block in call**
28: [GEM_ROOT]/gems/activerecord-3.0.11/lib/active_record/connection_adapters/abstract/query_cache.rb -> **cache**
12: [GEM_ROOT]/gems/activerecord-3.0.11/lib/active_record/query_cache.rb -> **cache**
31: [GEM_ROOT]/gems/activerecord-3.0.11/lib/active_record/query_cache.rb -> **call**
354: [GEM_ROOT]/gems/activerecord-3.0.11/lib/active_record/connection_adapters/abstract/connection_pool.rb -> **call**
46: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/callbacks.rb -> **block in call**
416: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/callbacks.rb -> **_run_call_callbacks**
44: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/callbacks.rb -> **call**
106: [GEM_ROOT]/gems/rack-1.2.5/lib/rack/sendfile.rb -> **call**
48: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/remote_ip.rb -> **call**
47: [GEM_ROOT]/gems/actionpack-3.0.11/lib/action_dispatch/middleware/show_exceptions.rb -> **call**
13: [GEM_ROOT]/gems/railties-3.0.11/lib/rails/rack/logger.rb -> **call**
17: [GEM_ROOT]/gems/rack-1.2.5/lib/rack/runtime.rb -> **call**
72: [GEM_ROOT]/gems/activesupport-3.0.11/lib/active_support/cache/strategy/local_cache.rb -> **call**
13: [GEM_ROOT]/gems/rack-1.2.5/lib/rack/lock.rb -> **block in call**
: [unknown source] -> ****
13: [GEM_ROOT]/gems/rack-1.2.5/lib/rack/lock.rb -> **call**
168: [GEM_ROOT]/gems/railties-3.0.11/lib/rails/application.rb -> **call**
77: [GEM_ROOT]/gems/railties-3.0.11/lib/rails/application.rb -> **method_missing**
530: [GEM_ROOT]/gems/unicorn-4.2.0/lib/unicorn/http_server.rb -> **process_client**
604: [GEM_ROOT]/gems/unicorn-4.2.0/lib/unicorn/http_server.rb -> **worker_loop**
487: [GEM_ROOT]/gems/unicorn-4.2.0/lib/unicorn/http_server.rb -> **spawn_missing_workers**
498: [GEM_ROOT]/gems/unicorn-4.2.0/lib/unicorn/http_server.rb -> **maintain_worker_count**
272: [GEM_ROOT]/gems/unicorn-4.2.0/lib/unicorn/http_server.rb -> **join**
121: [GEM_ROOT]/gems/unicorn-4.2.0/bin/unicorn -> ****
19: [GEM_ROOT]/bin/unicorn -> **load**
19: [GEM_ROOT]/bin/unicorn -> **

**

```
## Environment ##

REMOTE_ADDR:
127.0.0.1

REQUEST_METHOD:
GET

REQUEST_PATH:
/verifikat/nytt

PATH_INFO:
/verifikat/nytt

REQUEST_URI:
/verifikat/nytt

SERVER_PROTOCOL:
HTTP/1.0

HTTP_VERSION:
HTTP/1.0

HTTP_HOST:
mage.staging.datasektionen.se

HTTP_X_REAL_IP:
::ffff:46.182.200.52

HTTP_X_FORWARDED_FOR:
::ffff:46.182.200.52

HTTP_CONNECTION:
close

HTTP_USER_AGENT:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

HTTP_ACCEPT:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

HTTP_ACCEPT_ENCODING:
gzip,deflate,sdch

HTTP_ACCEPT_LANGUAGE:
en-US,en;q=0.8

HTTP_ACCEPT_CHARSET:
ISO-8859-1,utf-8;q=0.7,*;q=0.3

HTTP_COOKIE:
__utma=239681174.1852528288.1330348529.1330355123.1330439996.3; __utmc=239681174; __utmz=239681174.1330348529.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _mage_session=BAh7CEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjoGRVRbCEkiCVVzZXIGOwBGWwZpBzBJIg9zZXNzaW9uX2lkBjsARiIlNTVmZjhiOWE3YjVkOWM2OWZlYWVjYmM0NTYyNmJmYTdJIhBfY3NyZl90b2tlbgY7AEZJIjFIdmFrRGV4RUU2Vkw4L3ZEZnIrY3g5bXNOdW1BUHpXVDVxTlhSbzdadGFFPQY7AEY%3D--a00345cc4610384f185eda617ebf9a9da978675d; __utma=27640096.519451782.1330521012.1330521012.1330521012.1; __utmb=27640096.1.10.1330521012; __utmc=27640096; __utmz=27640096.1330521012.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

rack_url_scheme:
http

SERVER_NAME:
mage.staging.datasektionen.se

SERVER_PORT:
80

key:
action_dispatch.request.query_parameters

rack_input:
#

rack_errors:
#

rack_multiprocess:
true

rack_multithread:
false

rack_run_once:
false

rack_version:
["1", "1"]

SERVER_SOFTWARE:
Unicorn 4.2.0

rack_logger:
#

action_dispatch_parameter_filter:
["password"]

action_dispatch_secret_token:
5e4df1c89841e21fa8e9114c5dc73b264f9fc36e24e15162e727bf0e2d9ce2c84d8e315bdec3f5e1439c13fa0b08e5e218e8f2fbf3f12898b769975b1dcfa4cf

action_dispatch_show_exceptions:
true

action_dispatch_remote_ip:
::ffff:46.182.200.52

rack_session:
{"warden_user_user_key"=>"[\"User\", [\"2\"], \"\"]", "session_id"=>"55ff8b9a7b5d9c69feaecbc45626bfa7", "_csrf_token"=>"HvakDexEE6VL8/vDfr+cx9msNumAPzWT5qNXRo7ZtaE="}

rack_session_options:
{"path"=>"/", "key"=>"expire_after", "secure"=>"false", "httponly"=>"true", "id"=>"55ff8b9a7b5d9c69feaecbc45626bfa7"}

rack_request_cookie_string:
__utma=239681174.1852528288.1330348529.1330355123.1330439996.3; __utmc=239681174; __utmz=239681174.1330348529.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _mage_session=BAh7CEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjoGRVRbCEkiCVVzZXIGOwBGWwZpBzBJIg9zZXNzaW9uX2lkBjsARiIlNTVmZjhiOWE3YjVkOWM2OWZlYWVjYmM0NTYyNmJmYTdJIhBfY3NyZl90b2tlbgY7AEZJIjFIdmFrRGV4RUU2Vkw4L3ZEZnIrY3g5bXNOdW1BUHpXVDVxTlhSbzdadGFFPQY7AEY%3D--a00345cc4610384f185eda617ebf9a9da978675d; __utma=27640096.519451782.1330521012.1330521012.1330521012.1; __utmb=27640096.1.10.1330521012; __utmc=27640096; __utmz=27640096.1330521012.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

rack_request_cookie_hash:
{"__utma"=>"239681174.1852528288.1330348529.1330355123.1330439996.3", "__utmc"=>"239681174", "__utmz"=>"239681174.1330348529.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)", "_mage_session"=>"BAh7CEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjoGRVRbCEkiCVVzZXIGOwBGWwZpBzBJIg9zZXNzaW9uX2lkBjsARiIlNTVmZjhiOWE3YjVkOWM2OWZlYWVjYmM0NTYyNmJmYTdJIhBfY3NyZl90b2tlbgY7AEZJIjFIdmFrRGV4RUU2Vkw4L3ZEZnIrY3g5bXNOdW1BUHpXVDVxTlhSbzdadGFFPQY7AEY=--a00345cc4610384f185eda617ebf9a9da978675d", "__utmb"=>"27640096.1.10.1330521012"}

action_dispatch_cookies:
{"__utma"=>"239681174.1852528288.1330348529.1330355123.1330439996.3", "__utmc"=>"239681174", "__utmz"=>"239681174.1330348529.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)", "_mage_session"=>"BAh7CEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjoGRVRbCEkiCVVzZXIGOwBGWwZpBzBJIg9zZXNzaW9uX2lkBjsARiIlNTVmZjhiOWE3YjVkOWM2OWZlYWVjYmM0NTYyNmJmYTdJIhBfY3NyZl90b2tlbgY7AEZJIjFIdmFrRGV4RUU2Vkw4L3ZEZnIrY3g5bXNOdW1BUHpXVDVxTlhSbzdadGFFPQY7AEY=--a00345cc4610384f185eda617ebf9a9da978675d", "__utmb"=>"27640096.1.10.1330521012"}

action_dispatch_request_unsigned_session_cookie:
{"warden_user_user_key"=>"[\"User\", [\"2\"], \"\"]", "session_id"=>"55ff8b9a7b5d9c69feaecbc45626bfa7", "_csrf_token"=>"HvakDexEE6VL8/vDfr+cx9msNumAPzWT5qNXRo7ZtaE="}

warden:
Warden::Proxy:57189600 @config={:default_scope=>:user, :scope_defaults=>{}, :default_strategies=>{:user=>[]}, :intercept_401=>false, :failure_app=>Devise::FailureApp}

action_dispatch_request_path_parameters:
{"action"=>"new", "controller"=>"vouchers"}

action_controller_instance:
#

action_dispatch_request_parameters:
{"action"=>"new", "controller"=>"vouchers"}

action_dispatch_request_formats:
["text/html"]