Rails 3.2.1
app name: demo
database: mongoDB with mongoid
I have this scaffolding set up in rails 3.2.1: localhost:3000/pages,
and I have these fields: title, content.
I have already filled in 3 rows of data to each field.
The problem is: after deleting the app(by removing the root folder) and creating the same app name(demo) with the same scaffolding(pages), those 3 rows of data remain showing up which I don’t want anymore.
Can anyone how to clean the database up?Thanks
The database exists outside your application, so deleting your application will not affect it. To empty or delete it you need to use the mongo command line or another mongo tool. Open up a terminal / command prompt and type:
And you should get the mongo command line. Switch to the DB for your app (it will most likely be of the form
[app_name]_[environment]:And use the dropDatabase command: