undefined method 'key?' for nil:NilClass
This is the error I am getting while going through M. Hartl's Rails Tutorial. Also, after saving my user_controller.rb file and refreshing http://localhost:3000/users/1, I get another error that is:
Gem::LoadError in UsersController#show
bcrypt-ruby is not part of the bundle. Add it to Gemfile.
bcrypt-ruby is in my gemfile however, and after I refresh again this error is gone. Its just a bit weird.
Here is my user_controller.rb
class UsersController < ApplicationController
def show
@user = User.find(params[:id])
end
def new
end
end
and here is my show.html.erb
<%= @user.name %>, <%= @user.email %>
Thank you all very much.