You also need to supply to_time. Assuming you want to know "how long since now":
<%= distance_of_time_in_words(@user.created_at, Time.now) %>
Alternatively, you can simply do this:
<%= distance_of_time_in_words_to_now(@user.created_at) %>
source
share