Could you publish a minimalist Github repository reproducing your error?
You may try to generate your mailer in order to check you are not forgetting something:
bundle exec rails generate mailer mailer_classname mailer_viewname
In your case:
bundle exec rails generate mailer user_mailer mailer