gpt4 book ai didi

ruby-on-rails - Devise/users/sign_in 重定向到错误的 Controller

转载 作者:数据小太阳 更新时间:2023-10-29 08:01:06 26 4
gpt4 key购买 nike

生命体征:

  • ruby 1.9.3p194(2012-04-20 修订版 35410)
  • [i686-linux] Rails 3.2.7
  • 设计 2.1.2

GET/users/sign_in 试图重定向到错误的 Controller 。它已停止重定向到 wecome#welcome(有效),ans 现在重定向到 devise/welcome#welcome,它不存在并在重定向时导致 500 错误,并记录以下错误:

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

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

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

Edits:

Here's the root route from routes.rb:

root :to => "welcome#welcome"

我回滚到之前的部署,应用程序再次运行。部署早于 rails 3.2.7。

gem 文件:

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 -
devise 2.1.2 + rails 3.2.6 + journey 1.0.3 = 有效。
devise 2.1.2 + rails 3.2.6 + journey 1.0.4 = 失败。

devise 2.1.2 + rails 3.2.7 + journey 1.0.4 = 失败。
devise 2.1.2 + rails 3.2.8 + journey 1.0.4 = 失败。

Rails 3.2.7 和 3.2.8 是安全版本,需要 journey 1.0.4。这让我陷入困境,直到我能够解决旅程。

最佳答案

我在设计路由到一个奇怪的地方时遇到了类似的问题(在我的例子中是“设计/作者”)。

它在包含 journey 1.0.4 的 gem 包更新后被破坏。我通过将旅程锁定到 1.0.3 来修复它。

关于ruby-on-rails - Devise/users/sign_in 重定向到错误的 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11770494/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com