Tishpr
Tishpr

Reputation: 141

I am using rake db:reset and it is returning an error

I am trying creating user-specific posts in the seeds file. the directions I am following tell me to reset the database. In the rails c (console) I entered:

    rake db:reset

It gave me this error. Doesn't make sense.

    NameError: undefined local variable or method `reset' for main:Object

Upvotes: 1

Views: 651

Answers (1)

Prakash Murthy
Prakash Murthy

Reputation: 13077

rake command is to be run from the command line; not from within the rails console.

See Rails gives NameError for all command line methods such as generate or rake for the same mistake.

Upvotes: 6

Related Questions