scaffold命令不适用于Rails 4.2.2



我正试图用Scaffold命令生成一个Rails应用程序,就像每个初学者的教程中一样:

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

我收到这个垃圾:

>     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)

我在这里错过了什么?

不能使用scaffold命令创建rails应用程序。首先使用创建一个新的rails应用程序

rails new app_name

然后使用scaffold命令生成迁移文件、模型、控制器等

最新更新