Role Based Authorisation

I’ve got salted login working but when i follow the rails receipe to add
role based authorisation I get this error:

NoMethodError in Admin#new

You have a nil object when you didn’t expect it!
The error occured while evaluating nil.roles