0

How do I drop a Grid object with the Ruby Mongo Driver? I do drop from the shell, because it treats GridFS as collections, but how do I do it with Ruby?

2 Answers 2

2

Are you trying to remove a single file or the entire GridFS collections? the grid_file_system supports deleting by filename. Otherwise you can manually drop the collections (I think fs.files and fs.chunks by default)

Sign up to request clarification or add additional context in comments.

1 Comment

I want to remove the entire GridFS collections by calling a method like remove on the Ruby Grid object, but I guess that's not possible. Looks like I'll have to create Collection objects for each of the collections that make up the GridFS and call remove on both of them.
1

Grids it's just to collections: files and chunks. So just drop these two collections.

I am not familiar with ruby but mb this link will be useful for you.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.