设计/ users / sign_in重定向到错误的控制器 [英] Devise /users/sign_in redirecting to wrong controller

查看:90
本文介绍了设计/ users / sign_in重定向到错误的控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重要:


  • 红宝石1.9.3p194(2012-04-20修订35410)

  • [i686-linux] Rails 3.2.7

  • Devise 2.1.2

GET / users / sign_in尝试重定向到错误的控制器。它已停止重定向到wecome#welcome(起作用),ans现在正重定向到devise / welcome#welcome,该命令不存在,并在重定向中导致500错误,并记录了以下错误:

The GET /users/sign_in is attempting to redirect to the wrong controller. It has stopped redirecting to wecome#welcome (which works), ans is now redirecting to devise/welcome#welcome, which does not exist and causes a 500 error on the redirect with the following error logged:


ActionController::RoutingError (No route matches {:controller=>"devise/welcome", :action=>"welcome"}):

这是最近才开始的,似乎是由一系列gem更新引起的。

This started recently, and appears to have been caused by something in a series of gem updates. It used to work perfectly.

有人知道为什么它会开始失败吗(例如哪个gem的哪个更新),或者我能做些什么?

Does anybody have any idea why this would start failing ( e.i. which update of which gem) or what I can do about it?

编辑:

这是来自routes.rb的根路由:

Here's the root route from routes.rb:

root :to => "welcome#welcome"

我回滚到以前的部署,该应用程序再次运行。部署是在Rails 3.2.7之前进行的。

I rolled back to my previous deployment, and the app works again. The deployment was prior to rails 3.2.7.

Gemfile:

source 'http://rubygems.org'

gem 'rails', '~> 3.2.1'
gem 'rake'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'pg'

gem 'devise', '~> 2.1.0'
gem 'devise-encryptable', '~> 0.1.1'
gem 'devise_invitable', '~> 1.0.0'

gem 'haml', "~> 3.1.6"
gem "rdiscount", "~> 1.6.8"
gem 'markaby'

gem 'foreigner', "~> 1.1.5"

gem 'ancestry'
gem 'acts_as_list'

gem 'dynamic_form'
gem 'friendly_id', "~> 4.0.0"


gem 'net-ssh', :git => 'git://github.com/nessche/net-ssh.git'


group :assets do
  gem 'sass-rails',   "~> 3.2.3"
  gem 'coffee-rails', "~> 3.2.1"
  gem 'uglifier', "~> 1.2.3"
end

gem 'therubyracer', "~> 0.10.1"
gem 'jquery-rails', "~> 2.0.1"

gem 'newrelic_rpm', "~> 3.3.1"

gem "marginalia", "~> 1.1.0"


group :development do
  gem 'capistrano', "~> 2.12.0"
  gem 'rvm-capistrano'
#  gem "mail_view", "~> 1.0.1", :git => 'https://github.com/37signals/mail_view.git'
#  gem 'rails_admin'
  gem 'rails-footnotes', '>= 3.7.5.rc4'
  gem 'annotate', '~> 2.4.0'
end

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
 group :development, :test do
   gem 'webrat'
   gem 'rspec'
   gem 'cucumber'
   gem 'gherkin'
   gem 'spork'
   gem 'spin'
   gem 'capybara'
   gem 'sqlite3'
   gem 'nifty-generators'
   gem 'mocha'
 end

编辑:2012-08-27-

设计2.1.2 +导轨3.2.6 +旅程1.0.3 =作品。< br>
设计2.1.2 +轨道3.2.6 +旅程1.0.4 =失败。

EDIT: 2012-08-27 -
devise 2.1.2 + rails 3.2.6 + journey 1.0.3 = works.
devise 2.1.2 + rails 3.2.6 + journey 1.0.4 = fails.

设计2.1.2 +滑轨3.2.7 +旅程1.0.4 =失败。

设计2.1.2 +滑轨3.2.8 +旅程

devise 2.1.2 + rails 3.2.7 + journey 1.0.4 = fails.
devise 2.1.2 + rails 3.2.8 + journey 1.0.4 = fails.

Rails 3.2.7& 3.2.8,这是安全发布,需要旅程1.0.4。

Rails 3.2.7 & 3.2.8, which are security releases require journey 1.0.4. This leaves me pretty well stuck until I can either get a fix for journey.

推荐答案

我在将设计路由到

在包含旅程1.0.4的gem bundle更新之后,它就被打破了。我通过将旅程锁定为1.0.3。来解决它。

It was broken after a gem bundle update that included journey 1.0.4. I fixed it by locking journey to 1.0.3.

这篇关于设计/ users / sign_in重定向到错误的控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆