我已经关注了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>'
在本地测试它可以很好地处理预期的结果。有什么想法吗?
答案 0 :(得分:1)
一些健全性检查
您是否按初始化工具指南中的说明创建了文件config/initializers/panda.rb
?
运行heroku addons:open pandastream
&amp;验证您的S3存储桶和凭据。错误的凭证很可能会导致您在堆栈跟踪中看到connection error
尝试更新到最新版本的typhoeus
&amp; panda
看看是否有帮助
希望它有所帮助。如果这些都没有帮助,请不要忘记回发。