Instead of: `skip_before_action :authenticate_user!` You should use this line in Rails 5: `skip_before_action :authenticate_user!, raise: false` See this thread for more details https://github.com/plataformatec/devise/issues/4207#issuecomment-234587685