开发者

Heroku help rails app crashed

My Rails app crashs in Heroku when I run heroku open开发者_开发知识库 in git. Here is my crash log: http://pastie.org/1686899

On my local pc I use Ruby version 1.9.2p136, Rails version 3.0.3 with phpmyadmin. And when I run rails server all works fine.

Updated my new error log: http://pastie.org/1686947


You're using the 1.8.6 stack. Run heroku stack:migrate bamboo-mri-1.9.2 and then deploy the application again.

if you still have an issue, please paste the error you get with the 1.9.2 stack.

edit

It looks like you're running a custom select like konkurrancers".* FROM "konkurrancers" ORDER BY rand(), at least the log says

2011-03-18T10:40:11-07:00 app[web.1]: LINE 1: ... "konkurrancers".* FROM "konku rrancers" ORDER BY rand() LIM... 2011-03-18T10:40:11-07:00 app[web.1]:

The problem is that rand() is not a function in postgress and that's why you're getting an error. (Heroku uses postgress as the DB engine)

Edit 2

try(I assume the name of the entity is Konkurrance)

Konkurrance.all[rand(Konkurrance.all.size)]

Edit 3

konkurrances = Konkurrance.find_all_by_kategori_id(@kategor)
@bannerkat = konkurrances[ rand(konkurrances.size) ]

and the next question is going to be €10 - I accept paypal :p

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜