###前提・実現したいこと
https://github.com/alexreisner/geocoder#readme
こちらのチュートリアルを進めているのですが、
Object Geocoding > ActiveRecord内の
"$ rake db:migrate"が上手く行きません。
###発生している問題・エラーメッセージ
== 20161107123239 AddLatitudeAndLongitudeToModel: migrating =================== -- add_column(:models, :latitude, :float) rake aborted! StandardError: An error has occurred, this and all later migrations canceled: SQLite3::SQLException: no such table: models: ALTER TABLE "models" ADD "latitude " float myApp/db/migrate/20161107123239_add_latitude_and_longitude_to_model.rb :3:in `change' C:in `migrate' ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: models: AL TER TABLE "models" ADD "latitude" float myApp/db/migrate/20161107123239_add_latitude_and_longitude_to_model.rb :3:in `change' C:in `migrate' SQLite3::SQLException: no such table: models myApp/db/migrate/20161107123239_add_latitude_and_longitude_to_model.rb :3:in `change' C:in `migrate' Tasks: TOP => db:migrate:reset => db:migrate (See full trace by running task with --trace)
###該当のソースコード
Ruby
rails new myApp ↓ [Gemfile]ファイルに"gem 'geocoder'"を追記。 ↓ gem install geocoder ↓ bundle install ↓ rails generate migration AddLatitudeAndLongitudeToModel latitude:float longitude:float ↓ rake db:migrate★ここでエラー発生。★
###試したこと
https://teratail.com/questions/13618
以下のコマンドでDBをいったん削除して再実行します。
rake db:migrate:reset
↓
rake db:migrate
###補足情報(言語/FW/ツール等のバージョンなど)
ruby 2.1.8p440
rails 4.2.7.1
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。