我正在使用rails 4,ruby 2.3並且有問題。如何解決這個錯誤?PG :: UndefinedTable:錯誤:關係「carrinho」不存在
PG::UndefinedTable: ERROR: relation "carrinho" does not exist LINE 1: SELECT "carrinho".* FROM "carrinho" WHERE "carrinho"."id" I... ^: SELECT "carrinho".* FROM "carrinho" WHERE "carrinho"."id" IS NULL LIMIT 1
我的模型是carrinho.rb 我控制器carrinhos_controller.rb 我的看法是carrinhos 我的遷移是20160204181641_create_carrinhos.rb
而在拐點有:
inflect.plural "carrinhos", "carrinhos" inflect.plural "carrinho", "carrinhos" inflect.singular "carrinhos", "carrinho" inflect.singular "carrinho", "carrinho" inflect.irregular 'carrinho', 'carrinhos'
作一週,我試圖解決這個問題。請幫幫我!!
創建遷移後,你運行了'rake db:migrate'嗎? – Pavan
爲什麼不只是使用英語爲你的表,類和標識符? https://github.com/bbatsov/ruby-style-guide#naming。 – max
這不是我的錯,這個項目已經是葡萄牙語 –