堆栈级别太深:狂欢管理员 - 产品图片

时间:2015-01-11 22:09:56

标签: ruby-on-rails paperclip spree

我的生产环境中出现了针对spree 2.3.0的Stack Level Too Deep错误。

当我尝试转到“管理”面板中的产品图像索引页面时,会发生这种情况。这个错误在开发中没有发生,只在Ninefold上生产。在生产模式下本地运行应用程序时不会发生错误。我似乎可以追踪导致它的原因。我没有更改Spree中与产品图像相关的任何默认核心功能。图像在前端渲染得很好。

我正在使用paperclip和aws。有一次,生产没有错误。但是,我已经检查了所有提交,并且无法确定导致此问题的更改。我已经添加了其他宝石,但没有任何宝石与回形针宝石或其依赖性发生冲突,这是我对可能导致此问题的猜测。

这是生产日志错误。

+0000
I, [2015-01-11T22:02:28.691119 #26116] INFO -- : Processing by Spree::Admin::ImagesController#index as HTML
I, [2015-01-11T22:02:28.691252 #26116] INFO -- : Parameters: {"product_id"=>"black-string-tie-halter-top-with-printed-neck-binding"}
D, [2015-01-11T22:02:28.693443 #26116] DEBUG -- : Cache read: spree/app_configuration/redirect_https_to_http
D, [2015-01-11T22:02:28.693920 #26116] DEBUG -- : Cache read: spree/backend_configuration/locale
D, [2015-01-11T22:02:28.695806 #26116] DEBUG -- : [1m[36mSpree::Preference Load (0.7ms)[0m [1mSELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/backend_configuration/locale' LIMIT 1[0m
D, [2015-01-11T22:02:28.695979 #26116] DEBUG -- : Cache write: spree/backend_configuration/locale
D, [2015-01-11T22:02:28.696566 #26116] DEBUG -- : Cache read: spree/app_configuration/allow_ssl_in_production
D, [2015-01-11T22:02:28.696881 #26116] DEBUG -- : Cache read: spree/app_configuration/check_for_spree_alerts
D, [2015-01-11T22:02:28.697171 #26116] DEBUG -- : Cache read: spree/app_configuration/last_check_for_spree_alerts
D, [2015-01-11T22:02:28.699099 #26116] DEBUG -- : [1m[35mSpree::User Load (0.5ms)[0m SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."id" = 1 ORDER BY "spree_users"."id" ASC LIMIT 1
D, [2015-01-11T22:02:28.702026 #26116] DEBUG -- : [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "spree_roles" INNER JOIN "spree_roles_users" ON "spree_roles"."id" = "spree_roles_users"."role_id" WHERE "spree_roles_users"."user_id" = $1 AND "spree_roles"."name" = 'admin'[0m [["user_id", 1]]
I, [2015-01-11T22:02:28.706068 #26116] INFO -- : Completed 500 Internal Server Error in 15ms
F, [2015-01-11T22:02:28.706732 #26116] FATAL -- : 
SystemStackError (stack level too deep):
vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:629

任何帮助将不胜感激!

更新 - 生产环境中的完整堆栈跟踪:

SystemStackError in Spree::Admin::ImagesController#index
stack level too deep

Rails.root: /var/www/apps/11829/releases/dbeebbeebaf8ac5fa580e0fd192ad9fc06e7ce4b

Application Trace | Framework Trace | Full Trace
vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:629

1 个答案:

答案 0 :(得分:1)

所以经过我安装的所有宝石后,我终于找到了问题。

这是Spree :: Admin :: ImagesController装饰器中的alias_method导致Stack Level Too Deep错误。