启动时Heroku应用程序崩溃

问题描述:

今天,我创建了一个工作应用程序的副本,该应用程序在Heroku上运行完美,并试图将其部署到Heroku上,作为新项目的起点。启动时Heroku应用程序崩溃

我添加了新的文件夹作为git仓库,在GitHub上创建了一个新的远程仓库,编辑了配置文件并给数据库添加了新的名字,创建了新的数据库并试图部署到Heroku上。

当我尝试这个应用程序崩溃,并从远程日志,我可以看到这一点:

2011-06-27T12:45:28+00:00 heroku[web.1]: Starting process with command: `thin -p 29758 -e production -R /home/heroku_rack/heroku.ru start` 
2011-06-27T12:45:32+00:00 app[web.1]: /app/config/routes.rb:42:in `block in <top (required)>': undefined local variable or method `id' for main:Object (NameError) 
2011-06-27T12:45:32+00:00 app[web.1]: from /app/.gems/gems/actionpack-2.3.6/lib/action_controller/routing/route_set.rb:227:in `draw' 
2011-06-27T12:45:32+00:00 app[web.1]: from /app/config/routes.rb:1:in `<top (required)>' 

你能帮助我吗?

+0

你能显示你的'routes.rb'文件吗? – polarblau

+1

prolly你有你的routes.rb文件中的一些语法msitake –

+0

这确实是我的路线文件中的错误!奇怪的是我的其他应用程序完美地工作。不管怎么说,还是要谢谢你! – Augusto

我发现新应用程序在Ruby 1.9.2堆栈上运行,而较旧的应用程序在1.8.7 Ruby堆栈上运行。过渡到旧的堆栈,现在一切正常!