gpt4 book ai didi

ruby-on-rails - Heroku Rails 应用程序在 HTTP 请求时立即崩溃

转载 作者:数据小太阳 更新时间:2023-10-29 08:13:20 25 4
gpt4 key购买 nike

我的 Rails 应用程序在本地运行良好,但在 Heroku 上运行不正常。我可以毫无意外地调用 heroku run rake db:migrateheroku run rake db:reset,但是一旦我向应用程序发出 HTTP 请求,它就会立即崩溃。这是 heroku info 的输出:

Addons:        Basic Logging, Basic Release Management, Shared Database 5MB
Database Size: 1M
Git URL: git@heroku.com:blazing-dawn-5661.git
Repo Size: 52M
Slug Size: 53M
Stack: cedar
Web URL: http://blazing-dawn-5661.herokuapp.com/

这是向应用程序发出 HTTP 请求后 heroku logs 的输出(这里似乎没有什么特别有用的):

2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f
]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[we
b.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x519499]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_yield+0x66) [0x521d56]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x51307f]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby(rb_ary_each+0x45) [0x533735]
2012-03-30T13:02:13+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-03-30T13:02:13+00:00 app[web.1]:
2012-03-30T13:02:13+00:00 app[web.1]: [NOTE]
2012-03-30T13:02:13+00:00 app[web.1]: You may have encountered a bug in the Ruby interpreter or extension libraries.
2012-03-30T13:02:13+00:00 app[web.1]: Bug reports are welcome.
2012-03-30T13:02:13+00:00 app[web.1]: For details: http://www.ruby-lang.org/bugreport.html
2012-03-30T13:02:13+00:00 app[web.1]:
2012-03-30T13:02:14+00:00 heroku[web.1]: Process exited with status 139
2012-03-30T13:02:14+00:00 heroku[web.1]: State changed from up to crashed

最佳答案

看看这个:

Heroku 上的 Ruby 1.9.3 和 Rails 3.2

Heroku 的最新堆栈“Celadon Cedar”支持 Rails 3.2,但默认安装 Ruby 1.9.2。 Rails 3.2 推荐使用 Ruby 1.9.3。

您可以配置 Heroku 环境以使用 Ruby 1.9.3。

注意:Heroku 明确表示 Heroku 上的 Ruby 1.9.3 是实验性的,这意味着“不支持,ruby_version 将来会更改,并且此功能可能会在没有警告的情况下更改或删除”在回应 2012 年 1 月 31 日的询问时,Heroku 表示,“还没有时间表”来全面支持 Ruby 1.9.3。

注意:之前(2012 年 3 月 19 日之前)在 Heroku 上安装 Ruby 1.9.3 需要安装 heroku-labs 插件。 heroku-labs 插件已弃用,其功能现已合并到 heroku 客户端 gem 中。

取自here

关于ruby-on-rails - Heroku Rails 应用程序在 HTTP 请求时立即崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9944015/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com