NoBrainerORM / nobrainer

Ruby ORM for RethinkDB
http://nobrainer.io/
Other
386 stars 49 forks source link

Fatal Error with spring and user model #225

Closed elithecho closed 8 years ago

elithecho commented 8 years ago

Not sure if it's a nobrainer or devise-nobrainer issue.

Gotten fatal error RuntimeError: Fatal: The model 'User' is already registered and partially loaded. when using devise-nobrainer. No class methods were declared but fatal error was raised and this is the only model in the app.

The only way to get rid of this is to kill spring and restart the app.

This is how my User model looks like

class User
  include NoBrainer::Document
  include NoBrainer::Document::Timestamps
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and 
  devise :registerable, :rememberable, :trackable, :omniauthable, omniauth_providers: [:facebook]

  ## Rememberable
  field :remember_created_at, :type => Time
  ## Trackable
  field :sign_in_count,      :type => Integer, :default => 0
  field :current_sign_in_at, :type => Time
  field :last_sign_in_at,    :type => Time
  field :current_sign_in_ip, :type => String
  field :last_sign_in_ip,    :type => String
end
elithecho commented 8 years ago

Sorry, after doing a bit of digging I found this. https://github.com/nviennot/devise-nobrainer/issues/6 Thanks for the fix, used the master branch for now. 👍

nviennot commented 8 years ago

ah yes, I should release the new gem

elithecho commented 8 years ago

Cool, thanks for keeping this gem alive :+1:

akaghzi commented 8 years ago

is there any plan to release the new gem?

nviennot commented 8 years ago

Done!

akaghzi commented 8 years ago

thanks a lot