Hi everybody i am new developer in ROR. now i have one question to ask? i am using devise for authentication.it is work very well .but when i select data (category or sub_category) from database in app/views/layouts/application.html.erb and then i click sign_in it show errors as shown below: NoMethodError in Devise::Sessions#new Showing *C:/railsapp/facepro/app/views/layouts/application.html.erb* where line *#28* raised: undefined method `each' for nil:NilClass Extracted source (around line *#28*): 25 26 27 28 29 30 31 <li><a href="/">Home</a></li> <li><a href="#">Products</a> <ul class="dropdown-menu"> <% @categories.each do |category| %> <li><a href="#"><%= category.category_name %></a> <ul class="dropdown-menu"> please help me! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/aebbb661-5553-480b-b0f4-3e6a8907381c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.