开发者

Rails can't find my sqlite3 and table

开发者 https://www.devze.com 2023-03-22 01:32 出处:网络
Im a noob on rails. I tried to scaffold a model msg. it wo开发者_如何学编程rks finely when i use WEBrick server on a localhost.

Im a noob on rails.

I tried to scaffold a model msg. it wo开发者_如何学编程rks finely when i use WEBrick server on a localhost.

But when i tried to access this page (/msgs) using apache+passenger on other client it shows "We're sorry, but something went wrong."

i checked the log file,it shows "ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: msgs: SELECT "msgs".* FROM "msgs"):"

i tried

rails c p=Msg.new

i guess there will be error,but it works fine.

I have no idea on what is happening,do i miss anything?

Regards.

Nick


That error tells you that the table for msgs does not exist, you need to run rake db:migrate on the server you deployed your application to.

0

精彩评论

暂无评论...
验证码 换一张
取 消