::的ActionView ::模板错误(Fixnum对象的隐式转换成在Heroku字符串(Acti

2019-10-18 14:51发布

我的工作ROR应用与Mongodb.App工作正常在本地主机上,但是当我在Heroku上部署我收到错误。 我的一个视图文件的命令是这样的:

@h=Portfolio.last.folders
<%= @h%>

投资组合是与现场的文件夹作为阵列的集合。 MongoDB的生产包含此。 即使我尝试做相同的Heroku中轨控制台我得到了同样的错误是:

TypeError: no implicit conversion of Fixnum into String
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/protocol/commands/authenticate.rb:35:in `+'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/protocol/commands/authenticate.rb:35:in `digest'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/protocol/commands/authenticate.rb:47:in `build_auth_command'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/protocol/commands/authenticate.rb:25:in `initialize'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/node.rb:488:in `new'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/node.rb:488:in `login'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/node.rb:48:in `block in apply_auth'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/node.rb:47:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/node.rb:47:in `apply_auth'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/cluster.rb:250:in `with_secondary'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/session/context.rb:104:in `with_node'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/session/context.rb:43:in `query'
from /app/vendor/bundle/ruby/2.0.0/gems/moped-1.4.3/lib/moped/query.rb:115:in `first'
from /app/vendor/bundle/ruby/2.0.0/gems/mongoid-3.0.15/lib/mongoid/contextual/mongo.rb:233:in `last'
from /app/vendor/bundle/ruby/2.0.0/gems/mongoid-3.0.15/lib/mongoid/contextual.rb:18:in `last'
from /app/vendor/bundle/ruby/2.0.0/gems/mongoid-3.0.15/lib/mongoid/finders.rb:129:in `last'
from (irb):2
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'

在开发机器,我可以在控制台做到这一点。 任何猜测为什么这个错误在Heroku。

文章来源: ActionView::Template::Error (no implicit conversion of Fixnum into String on heroku