If you are learning Ruby on rails and trying to add friendly_id in your application, you might face this error.
ActiveRecord::RecordNotFound in EventsController#show
to solve this error all you have to do is , go to your event/user controller find the line
Event.find(params[:id]) // Event or User whatever it is in your case
and replace it with
This will solve the problem.