###前提・実現したいこと
テーブルをデータベースに反映させたいです。
###発生している問題・エラーメッセージ
[vagrant@localhost rew]$ rails db:migrate rails aborted! NoMethodError: undefined method `last_comment' for #<Rake::Application:0x007ff8182e5a50> /vagrant/rew/rakefile:6:in `<top (required)>' /vagrant/rew/bin/rails:9:in `require' /vagrant/rew/bin/rails:9:in `<top (required)>' /vagrant/rew/bin/spring:15:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>' (See full trace by running task with --trace)
###該当のソースコード
マイグレーションファイル
class CreateCallHists < ActiveRecord::Migration[5.1] def change create_table :call_hists do |t| t.datetime :date t.integer :tel t.integer :cosmo_id t.string :contact t.integer :csi_no t.text :memo t.integer :flg1 t.integer :flg2 t.integer :flg3 t.string :flg4 t.string :flg5 t.integer :call_id t.integer :tanyu_id t.timestamps end end end
###試したこと
rails newしてrspecを入れてモデルを作っただけです。
・rake db:migrateにする→効果なし
・railsのバージョンを5.1.2から5.0.4にする→効果なし
###補足情報(言語/FW/ツール等のバージョンなど)
CentOS7
vagrant
Vitualbox
Ruby2.4.0
Rails5.1.2
https://teratail.com/help/question-tips を熟読していただきたいのですが、teratailはサポートセンターではありませんので「大至急」といった煽るような文言はサイトの主旨からすると不適当と思います。
回答1件
あなたの回答
tips
プレビュー