Debet Wah Debet Wah - 7 months ago 39
Ruby Question

Don't know how to build task 'script/generate'

I started learning ruby on rails today, and I always encounter some sort of error. I'm following the tutorial on tutorialspoint. Now when I ran

rails script/generate model Book
I encountered

rails aborted!
Don't know how to build task 'script/generate' (see --tasks)
bin/rails:4:in `require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)


Drop the script part:

rails generate model Book # will work

P.S. Everyone starts with Hartl's tutorial, I think you should, too.