Lesson 2- 2/7 No migration file

For 2.Model 2/7, I did the first step of “rails generate model Message” and the course checked me off, but when it asked my to change the migration file, I could not find the file. I went to db/migrate but all I found were the development.sqlite3 and seeds.rb files in the folder. Was I supposed to make the file? Am I looking in the wrong place. I refreshed and logged out multiple times as well as checked the other directories just to make sure, but still nothing. Does anyone know what i’m doing wrong/missing here?

rails generate model Message generates it, see:

$ tree db
└── seeds.rb

0 directories, 1 file
$ rails generate model Message
Running via Spring preloader in process 25756
      invoke  active_record
      create    db/migrate/20160821174828_create_messages.rb
      create    app/models/message.rb
      invoke    test_unit
      create      test/models/message_test.rb
      create      test/fixtures/messages.yml
$ tree db
├── migrate
│   └── 20160821174828_create_messages.rb
└── seeds.rb

1 directory, 2 files

Was the generate command not successful? You could destroy it and generate it again, make sure to check the output.

Yeah I reset the exercise generated it again and looked through the folder. I think I just missed it when it was generated because the folder wasn’t open after it was generated. Thanks for you help.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.