I solved the problem as below
Firstly, the default images need to be saved on cloudinary. eg
<%= cl_image_tag("non_existing_id.png", width: 100, height: 100, default_image: "avatar.png") %>
if you dont want to load default image from cloudinary but from our localhost, add the below code in a partial and use this partial.
- if user.avatar.present?
= cl_image_tag(user.avatar.filename, width: 46, height: 46)
- else
= image_tag 'noPic_80.png', style: 'width:46px; height:46px;'