class UsersController < ApplicationController

  def index
    @users = User.all
    @user = current_user
    #@name = User.where(email: current_user.email).first.name
  end

  def show
    @user = User.find(params[:id])
    @users = User.all
  end

end

class UsersController < ApplicationController

  def index
    @user = current_user
    # redirect_to @user
    # raise @user.inspect
    # @name = User.where(email: current_user.email).first.name
  end

  def show
    @user = User.find(params[:id])
    @users = User.all
  end

end

Comment out @user declaration in controller since current_user is null
Comment out @user declaration in controller since current_user is null
