简体   繁体   中英

rails 3.2, mongo, and devise not working

I had a fully functional Rails 3.2 app with MySQL, I am trying to convert to MongoDB. I thought it would be a simple conversion but in my application.html.erb template, I reference current_user and I get this error:

undefined local variable or method `current_user' for #<#<Class:0x007f98674f58d8>:0x007f9867358840>

Any idea why this is failing?

Thanks, Kevin

It's not straight forward, You need to address below technical stuffs.

  1. Make sure to integrate Mongoid ORM for mongodb
  2. Dump the existing database straight to MongoDB
  3. Migrate the data(not need schema)
  4. Refactor models as needed(attributes on model)

I hope it's will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM