Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Graham Grochowski4,676 Points
undefined method `authenticate' for nil:NilClass
Ive spent probably an hour fiddling around with my code and cannot for the life of me figure out why this test wont pass.
Ive uploaded this as a github repo https://github.com/ggrochow/odot
Errors im getting
) UserSessionsController POST 'create' with correct credentials redirects to the todo list path Failure/Error: post :create, email: "firstname.lastname@example.org", password: "treehouse1" NoMethodError: undefined method `authenticate' for nil:NilClass # ./app/controllers/user_sessions_controller.rb:7:in `create' # ./spec/controllers/user_sessions_controller_spec.rb:22:in `block (4 levels) in <top (required)>'
Seth Reece32,867 Points
Your code looks fine to me. Could be your bcrypt-ruby gem, or maybe a typo in your user controller for has_secure_password? Is your project in workspaces to be forked, or on github?