Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Deleting all users and statuses

what are the commands to delete all users and statuses from my databases, I feel like this is what is giving me some issues with using

<%= @status.user.full_name %>

It's saying there's no method for 'full_name', but there certainly is

2 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

In the rails console, you can run:


That will delete all statuses from the database.



Will delete all the users.

Thank you, this is what I needed.. I don't know what's going on but something doesn't have a value so it's throwing the whole database..hopefully this will solve it

Yeah, deleting all Statuses and Users using the console fixed the problem

Tony McKeown
Tony McKeown
Courses Plus Student 14,300 Points

If you want to delete the whole database I think (off the top of my head) you could enter rake db:reset

This link seems to discuss various commands on your database.


Thank you.. just to be sure, the database/db is what's holding user accounts, statuses, and everything else right?