100 M),但无法将其推送到 heroku。 我一遍又一遍地得到同样的错误: Taps Server Error: und-6ren">
gpt4 book ai didi

ruby-on-rails - Heroku 数据库 :push throws "Taps Server Error: undefined method ` symbolize_keys' for nil:NilClass"

转载 作者:行者123 更新时间:2023-12-04 06:00:58 24 4
gpt4 key购买 nike

我正在切换到 Heroku 托管。我的本地机器上有当前生产数据库的副本(> 100 M),但无法将其推送到 heroku。

我一遍又一遍地得到同样的错误:

Taps Server Error: undefined method `symbolize_keys' for nil:NilClass

这似乎与数据库中的一些 NULL 值有关(不是全部)。有想法该怎么解决这个吗?谢谢!

这是完整的输出:
!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: undefined method `symbolize_keys' for nil:NilClass
/app/lib/taps/data_stream.rb:183:in `parse_json'/app/lib/taps/server.rb:69:in
POST /sessions/:key/push/verify_stream /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in
call/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in
route /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in
instance_eval /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in
route_eval /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in
route!/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in
catch/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in
route!/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in
each/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in
route!/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in
dispatch! /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in
call! /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
instance_eval /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
invoke/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
catch /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
invoke /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in
call!/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in
call/app/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/auth/basic.rb:25:in
call /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in
call /app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in
synchronize/app/.bundle/gems/ruby/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in
call/home/heroku_rack/lib/static_assets.rb:9:in
call'/home/heroku_rack /lib/last_access.rb:15:in
call'/app/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:47:in
call'/app/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in
each'/app/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in
call'/home/heroku_rack/lib/date_header.rb:14:in
call'/app/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:77:in
call'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/connection.rb:76:in
pre_process'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/connection.rb:74:in
catch'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/connection.rb:74:in
pre_process'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/connection.rb:57:in
process'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/connection.rb:42:in
receive_data'/app/.bundle/gems/ruby/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run_machine'/app/.bundle/gems/ruby/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in
start'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/server.rb:156:in
start'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in
start'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/runner.rb:177:in
send'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/runner.rb:177:in
run_command'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/thin/runner.rb:143:in
run!'/app/.bundle/gems/ruby/1.8/gems/thin-1.2.7/bin/thin:6/usr/ruby1.8./bin/thin:19:in
load'/usr/ruby1.8.7/bin/thin:19

最佳答案

Heroku 博客对使用 taps 将大数据推送到 heroku 的策略进行了很好的讨论

  • 要拆分工作,请仅推送特定表
    heroku db:pull --tables 日志,标签
  • 使用崩溃日志文件恢复传输
    heroku db:pull --resume-filename session_file.dat

  • 更多信息请参见: http://blog.heroku.com/archives/2010/4/21/supporting_big_data_part_1/

    关于ruby-on-rails - Heroku 数据库 :push throws "Taps Server Error: undefined method ` symbolize_keys' for nil:NilClass",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6910374/

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