Facing error migrating my first rails app


#1

typed “rails db:migrate”
this came out : -

== 20200131121534 CreateCars: migrating =======================================
– create_table(:cars)
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method integar' for #<ActiveRecord::ConnectionAdapters::SQLite3::TableDefinition:0x000055f1e4ec8f20> Did you mean? integer /home/rtsakin/odin_on_rails/my_first_rails_app/db/migrate/20200131121534_create_cars.rb:6:inblock in change’
/home/rtsakin/odin_on_rails/my_first_rails_app/db/migrate/20200131121534_create_cars.rb:3:in change' /home/rtsakin/odin_on_rails/my_first_rails_app/bin/rails:9:in<top (required)>’
/home/rtsakin/odin_on_rails/my_first_rails_app/bin/spring:15:in <top (required)>' bin/rails:3:inload’
bin/rails:3:in `’

Caused by:
NoMethodError: undefined method integar' for #<ActiveRecord::ConnectionAdapters::SQLite3::TableDefinition:0x000055f1e4ec8f20> Did you mean? integer /home/rtsakin/odin_on_rails/my_first_rails_app/db/migrate/20200131121534_create_cars.rb:6:inblock in change’
/home/rtsakin/odin_on_rails/my_first_rails_app/db/migrate/20200131121534_create_cars.rb:3:in change' /home/rtsakin/odin_on_rails/my_first_rails_app/bin/rails:9:in<top (required)>’
/home/rtsakin/odin_on_rails/my_first_rails_app/bin/spring:15:in <top (required)>' bin/rails:3:inload’
bin/rails:3:in `’
Tasks: TOP => db:migrate
(See full trace by running task with --trace)


#2

you have a spelling error in your migration. You need to go to the db folder and then the migrations folder and open the migration with the problem. Correct integar to integer and then try running it again.


#3

Thanks a lot.