开发者

Rails can't find my sqlite3 and table

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜