C:UsersMEGHA>rails new sagar_blog
create
create README.rdoc
create Rakefile
... <snip> ...
Using turbolinks (2.2.1)
Using uglifier (2.5.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
C:UsersMEGHA>cd sagar_blog
C:UsersMEGHAsagar_blog>rails generate scaffold post title:string body:text
invoke active_record
... <snip> ...
create app/assets/stylesheets/posts.css.scss
invoke scss
create app/assets/stylesheets/scaffolds.css.scss
C:UsersMEGHAsagar_blog>rails generate scaffold comment post_id:integer body:
text
invoke active_record
create db/migrate/20140402091132_create_comments.rb
... <snip> ...
invoke scss
identical app/assets/stylesheets/scaffolds.css.scss
C:UsersMEGHAsagar_blog>rake db:migrate
== 20140402091036 CreatePosts: migrating ======================================
-- create_table(:posts)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `text' for :t:SymbolC:/Users/MEGHA/sagar_blog/db/migrate/201404
02091036_create_posts.rb:6:in `block in change'
C:/Users/MEGHA/sagar_blog/db/migrate/20140402091036_create_posts.rb:3:in `change
'
C:in `migrate'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
See Question&Answers more detail:os