新手问题 rake wechat:menu_create 提示 invalid sub button key size (40026) 错误

caiqinghua · 2015年08月26日 · 3379 次阅读

出错信息

使用 wechat gem 包

deploy@iZ94ra5tl2iZ:~/weishop_deploy/current$ RAILS_ENV=production rake wechat:menu_create rake aborted! Wechat::ResponseError: invalid sub button key size(40026) /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/client.rb:42:in block in request' /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/client.rb:70:inparse_response' /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/client.rb:31:in request' /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/client.rb:19:inpost' /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/api.rb:86:in block in post' /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/api.rb:92:inwith_access_token' /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/api.rb:86:in post' /home/deploy/weishop_deploy/releases/290/vendor/bundle/ruby/2.1.0/bundler/gems/wechat-rails-5618101f1b41/lib/wechat/api.rb:37:inmenu_create' /home/deploy/weishop_deploy/releases/290/lib/tasks/wechat.rake:7:in `block (2 levels) in ' Tasks: TOP => wechat:menu_create (See full trace by running task with --trace)

原因:

点击类别的菜单设置了一个网址,超出了最大长度。

代码修改:

wechat_menu.yaml

把 click 改为 view 即可解决问题

杂记

PG::InFailedSqlTransaction at /admin/products/000/variants ERROR: current transaction is aborted, commands ignored until end of transaction block

google: PG::FeatureNotSupported: ERROR: cached plan must not change result type http://stackoverflow.com/questions/2783813/postgres-8-3-error-cached-plan-must-not-change-result-type 重启 rails 服务即可

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号