Rake aborted! Don't know how to build task 'populate'

1
$ rake db:populate

or

1
$ bundle exec rake db:populate

While you were writing above command, you get errors like Don't know how to build task 'populate'.

Let’s fix,

Firstly, you should check

1
lib/tasks/sample_data.rb
  • if this file exist, you should rename this file
1
sample_data.rake

then try to run tour rails project.

  • if not exist, you should create new file in lib/tasks directory, sample_data.rake.

That’ s all.

Comments