Rails 一个用 spree 搭建的网店,/admin 连接不了

fengluo · February 29, 2012 · Last by fengluo replied at February 29, 2012 · 4700 hits

这是我学长转手给我一个基于 rails 用 spree 搭建的网店。服务器是 apache+passenger 原来后台 admin 登录时,自动使用 https 链接。 不过我这里始终登录成功,却验证失败。 所以我想,干脆去掉 apache 中的 ssl 模块吧。 可是去掉之后,前台能正常显示,后台 admin 却始终不能访问。 截取 apache 的 error.log 最后这一段,求大家帮我看看啊!(实在不知道问题出在哪…) ''' DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from /usr/lib/ruby/1.8/activerecord.rb:2) [DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.order" is no longer supported cache: [GET /] miss cache: [GET /admin] miss [Wed Feb 29 09:22:17 2012] [notice] caught SIGTERM, shutting down [Wed Feb 29 09:22:18 2012] [warn] module passenger_module is already loaded, skipping [Wed Feb 29 09:22:18 2012] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch Phusion_Passenger/3.0.9 configured -- resuming normal operations '''

有 WARNING,没 Error,看不出问题

去掉 Admin::baseController 里的 ssl_required 试试

#2 楼 @ywencn 感谢你的提醒!不过因为用是 spree 这个系统,所以 app/controller 下没有东西。我搜了一下 spree 如何去除 ssl,在 config/initializers/spree.rb 下加入Spree::Config.set(:allow_ssl_in_production => false) 就可以访问 admin 了,不过还是提示登录成功,验证失败…

#3 楼 @fengluo 什么叫“验证失败”?

登录之后提示这个信息: login successfully Authorization Failure

#5 楼 @fengluo Authorization Failure 应该是程序内部的权限控制逻辑抛出来的东西。 和 https 什么的没有关系。你应该检查代码。

#4 楼 @ywencn 果然没错!发现给我的账号根本不是管理员账号!fuck my life!多谢你!!!

You need to Sign in before reply, if you don't have an account, please Sign up first.