heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
23.98k stars 5.55k forks source link

devise 1.1.2 rails 3.0.0 and mongo_mapper #485

Closed ranjay closed 14 years ago

ranjay commented 14 years ago

I 'm using devise 1.1.2 and rails 3.0.0 with orm as mongo_mapper..but I 'm getting same error NoMethodError (undefined method `new_user_session_path' for #Devise::FailureApp:0x276fa68):

Actually devise1.1.2 doesn't provide mongo_mapper so I 'm ceated the mongo_mapper orm file in devise-1.1.2\lib\devise\orm as:-

module Devise module Orm

module MongoMapper def self.included_modules_hook(klass) klass.send :extend, self yield

klass.devise_modules.each do |mod|
  klass.send(mod) if klass.respond_to?(mod)
end

end

def find(*args) options = args.extract_options! case args.first when :first first(options) when :all all(options) else super end end

include Devise::Schema

Tell how to apply schema methods. This automatically converts DateTime

to Time, since MongoMapper does not recognize the former.

def apply_schema(name, type, options={}) return unless Devise.apply_schema type = Time if type == DateTime key name, type, options end end

end end

MongoMapper::Plugins::Document::ClassMethods.send(:include, Devise::Models) MongoMapper::Plugins::EmbeddedDocument::ClassMethods.send(:include, Devise::Models)

carlosantoniodasilva commented 14 years ago

Chances are this has nothing to do with your MongoMapper stuff. Are you sure you're not overriding any route from Devise? Also, please try removing your Gemfile.lock, locking devise to 1.1.2 and Rails to 3.0.0 if they're not, and bundling it all again.

ranjay commented 14 years ago

I deleted the gemfile and build again then same problem. my gemfile.lock dependency :-

DEPENDENCIES capistrano

compass

devise (= 1.1.2) ezcrypto haml hpricot jammit mongo mongo_mapper rails (= 3.0.0) responders wand warden (= 0.10.7)

my routes.rb include:- devise_for :users

Thanks for your quick reply..

ranjay commented 14 years ago

Hey..I 'm using devise :saml_authenticatable so definately there is some problem with my saml thing. because devise :authenticatable works ...closing this issue..thanks