I think you can have rescue_from in your application controller, and you can render the right response for that. See http://api.rubyonrails.org/classes/ActiveSupport/Rescuable/ClassMethods.html#method-i-rescue_from
Also, I thought that RoutingError is already 404: https://github.com/rails/rails/blob/v3.2.12/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L9