2012-07-13 74 views
0

我将我的应用程序部署到Heroku。当我想查看记录时,它会返回错误:Heroku在活动管理员返回Postgres错误

2012-07-13T22:28:04+00:00 app[web.1]: Started GET "/admin/non_profits/1" for 200.40.55.210 at 2012-07-13 22:28:04 +0000 
2012-07-13T22:28:06+00:00 app[web.1]: ActionView::Template::Error (PG::Error: ERROR: operator does not exist: character varying = integer 
2012-07-13T22:28:06+00:00 app[web.1]: LINE 1: ...Profit' AND "active_admin_comments"."resource_id" = 1 AND "a... 
2012-07-13T22:28:06+00:00 app[web.1]: HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. 

任何提示?

+0

你使用Postgres作为你的开发数据库吗? – 2012-07-14 01:50:01

+0

不可以。我的开发数据库是MySql。 – Tony 2012-07-14 15:42:46

回答

0

是的,我会建议改变你的开发数据库转到PG。 Heroku强烈建议您在Cedar堆栈https://devcenter.heroku.com/articles/rails3上执行此操作。

这应该有助于您在开发过程中重现问题。

+0

我明白。谢谢。现在不可能,但是不是来自活动管理员的不兼容问题? – Tony 2012-07-16 12:44:48

+0

我不确定。这只是我第一次想到为什么你会在生产中得到这个错误,而不是在开发中。但我可能是错的。 – 2012-07-16 23:48:35