etayluz
etayluz

Reputation: 16416

scaffold command does not work with Rails 4.2.2

I'm trying to generate a Rails app with the Scaffold command as in every beginner's tutorial:

rails generate scaffold Post name:string title:string content:text

I'm getting this junk:

>     Usage:
>       rails new APP_PATH [options]
>     
>     Options:
>       -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
>                                                              # Default: /Users/etayluz/.rvm/rubies/ruby-2.2.1/bin/ruby
>       -m, [--template=TEMPLATE]                              # Path to some application template (can be a filesystem path or URL)

What am I missing here?

Upvotes: 0

Views: 221

Answers (1)

webster
webster

Reputation: 4012

You cannot create a rails app with the scaffold command. First create a new rails application using

rails new app_name

then use the scaffold command to generate the migration file, model, controller etc

Upvotes: 2

Related Questions