【问题标题】:Pandastream heroku errorPandastream heroku 错误
【发布时间】:2012-06-13 15:33:36
【问题描述】:

我已关注 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>'

在本地测试它可以达到预期的效果。有什么想法吗?

【问题讨论】:

    标签: ruby-on-rails heroku pandastream


    【解决方案1】:

    一些健全性检查

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

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

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

    希望对您有所帮助。如果这些都没有帮助,请不要忘记回帖。

    【讨论】:

    • 谢谢伙计,我在发疯的时候问了这个问题。我最终用健全性检查方法让它工作了:)。
    猜你喜欢
    • 2014-02-25
    • 2019-01-03
    • 2017-07-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-05
    相关资源
    最近更新 更多