Debet Wah Debet Wah - 1 year ago 88
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)

Answer Source

Drop the script part:

rails generate model Book # will work

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download