Rails App Refinery+Devise: Can't access Devise views

孤者浪人 提交于 2019-12-08 08:12:19

问题


newbie Rails developer here.

I'm trying to create an app that uses Devise for authentication and Refinery for content management. I've followed these tutorials:

http://sdownie.com/blogs/integrating-refinery-rails-3-2-into-your-existing-rails-app http://refinerycms.com/guides/with-an-existing-rails-31-devise-app

I'm unable to access any of the Devise views on the site. For example when I go to /users/sign_in I get a 404. In my server logs I see the following that makes me think that Refinery is processing the request instead of the Devise routes:

Processing by Refinery::PagesController#show as HTML
Parameters: {"path"=>"users/sign_up"}
...
Filter chain halted as :find_page rendered or redirected
Completed 404 Not Found in 39ms (Views: 32.8ms | ActiveRecord: 1.6ms)

Any idea how I can correct this and access the Devise sign_in/sign_up views? This is my first stackoverflow question, so if I need to add more specific information let me know.

Much appreciated


回答1:


Figured it out. I mounted refinery at /cms instead of root in my routes.rb:

mount Refinery::Core::Engine, :at => '/cms'

More info here: https://github.com/refinery/refinerycms/issues/2116



来源:https://stackoverflow.com/questions/16380806/rails-app-refinerydevise-cant-access-devise-views

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!