2

我已经设置了一个新的 rails 应用程序,安装了 spree gem (1.1.2),并且能够成功启动并运行 Spree,但是我没有 SSL 证书,我只是想在购买之前弄乱 Spree cert 等。我可以成功显示将显示产品等的狂欢页面,但是当我转到 /admin 时,它会重定向回该站点的主页。这是日志显示的内容:

Started GET "/admin" for 76.122.36.219 at Wed Jul 18 15:25:42 -0500 2012
Processing by Spree::Admin::OverviewController#index as HTML
Redirected to http://**************.com/
Completed 302 Found in 139ms (ActiveRecord: 5.1ms)

我已经更新了 config/initializers/spree.rb 以包含

config.allow_ssl_in_production = false

这样它就不会使用 SSL。

这是我的耙子

About your applications environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.6.2
Rack version              1.4
Rails version             3.2.6
JavaScript Runtime        therubyracer (V8)
Active Record version     3.2.6
Action Pack version       3.2.6
Active Resource version   3.2.6
Action Mailer version     3.2.6
Active Support version    3.2.6
Middleware                ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x70d884a28a50>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport
Application root          /home/********/**************
Environment               development
Database adapter          mysql2
Database schema version   20120718173536

我试过搜索无济于事;我发现的大部分内容都讨论了打开/关闭 SSL 以进行登台。如果有帮助,我的服务器使用 Phusion Passenger 进行部署(Site5)..

任何帮助或方向将不胜感激!谢谢!

4

1 回答 1

2

在搜索了更多之后,我在这里找到了问题的答案。

本质上,您只需要安装另一个名为spree_auth_devise的 Gem 。

于 2012-07-19T19:24:53.210 回答