0

我已关注 Heroku 上的 pandastream 设置文档,可在此处获取https://devcenter.heroku.com/articles/pandastream

但是在使用heroku run console和执行时Panda::Profile.all我得到

irb(main):001:0> Panda::Profile.all
NoMethodError: undefined method `connection' for nil:NilClass
    from /app/vendor/bundle/ruby/1.9.1/gems/panda-1.5.0/lib/panda/modules/cloud_connection.rb:4:in `connection'
    from /app/vendor/bundle/ruby/1.9.1/gems/panda-1.5.0/lib/panda/modules/finders.rb:19:in `find_object_by_path'
    from /app/vendor/bundle/ruby/1.9.1/gems/panda-1.5.0/lib/panda/modules/finders.rb:23:in `find_by_path'
    from /app/vendor/bundle/ruby/1.9.1/gems/panda-1.5.0/lib/panda/modules/finders.rb:44:in `all'
    from (irb):1
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/commands/console.rb:47:in `start'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/commands/console.rb:8:in `start'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

在本地测试它可以很好地达到预期的结果。有任何想法吗?

4

1 回答 1

1

一些健全性检查

  1. config/initializers/panda.rb您是否按照初始化程序指南中的说明创建了文件?

  2. 运行heroku addons:open pandastream并验证您的 S3 存储桶和凭证。错误的凭证很可能会导致connection error您在堆栈跟踪中看到的那样

  3. 尝试更新到最新版本的typhoeus&panda看看是否有帮助

希望能帮助到你。如果这些都没有帮助,请不要忘记回帖。

于 2012-06-11T18:56:37.130 回答