2013-04-08 80 views
1

我最近将项目从3.1升级到了Rails 3.2,并一直在试图弄清楚为什么路由不能很好地与devise一起玩。Rails升级到3.2路线/区域设置失败

NoMethodError - undefined method `locale' for #<ActionDispatch::Request:xxxxx>: 

这是新的(1)Journey路由引擎。现在的问题是Devise只有其他模块没有错误。我可以说这个问题在我的范围内使用。如果我准备好范围,它就可以工作。

scope "(:locale)", :locale => /#{I18n.available_locales.join("|")}/ do 
    devise_for :users, :controllers => { :registrations => "users/registrations" } 
    ... 
end 

1)Line 7(133)。请参阅跟踪和Journey line error in context here.

任何意见和指导表示赞赏。谢谢。

的Rails 3.2的Ruby 1.9.3

回答