kandanapp / kandan

Kandan is an Open Source Alternative to HipChat
GNU Affero General Public License v3.0
2.72k stars 408 forks source link

Version 1.2 is broken (devise) #398

Closed bodrovis closed 9 years ago

bodrovis commented 9 years ago

Hello once again. Version 1.2 is broken, because in Gemfile Devise has no version (https://github.com/kandanapp/kandan/blob/v1.2/Gemfile#L13) and when starting the server an error uninitialized con stant Devise::Models::TokenAuthenticatable appears - this was removed more than a year ago (https://github.com/plataformatec/devise/issues/2723, http://blog.plataformatec.com.br/2013/08/devise-3-1-now-with-more-secure-defaults/)

scouttyg commented 9 years ago

You are completely correct, looks like it was removed in Devise 3.2.0

I'll version it to 3.1.1 for now until we can either figure out another gem to do token authentication, or rethink the feature.

scouttyg commented 9 years ago

Actually, I don't think we are even using TokenAuthenticatable anymore -- you notice it's not in config/initializers/kandan.rb:

module Kandan
  def self.devise_modules
    standard = [:database_authenticatable, :registerable,
                :recoverable, :rememberable, :trackable, :validatable]
  end
end

And this was addressed in a pull request about 6 months ago in #346

I still agree that we should probably be versioning the gems, so that way things don't break automatically, but I wonder if there is something else at play here as to why you are getting that error.

bodrovis commented 9 years ago

@scouttyg Well that was a clean installation, I just downloaded the repo and launched the app so not really sure what else could be causing that... I'll try to recreate that problem.

bodrovis commented 9 years ago

@scouttyg Well the line that causes the error is this one: https://github.com/kandanapp/kandan/blob/master/app/models/user.rb#L23

And token_authenticatable is still present in 1.2 branch (which is assumed to be stable): https://github.com/kandanapp/kandan/blob/v1.2/config/initializers/kandan.rb#L9

Probably this issue will not appear in the master branch. Is v1.2 still maintained? Or should I use master instead?

scouttyg commented 9 years ago

@bodrovis Ah I missed when you said 1.2 version of Kandan, I was thinking version 1.2 of Devise for some reason.

I know I've been working off master to make it as launchable as possible, so I'd definitely try out master if you've only worked with 1.2 -- I might need to go back and update the other versions with the commits we've been adding in master.

bodrovis commented 9 years ago

Okay, this error does not appear at master so closing the issue. However it seems that v1.2 cannot be called stable anymore. Maybe something about that should be mentioned in the docs :)

scouttyg commented 9 years ago

@bodrovis Agreed. I'll update the documentation to reflect this, and work on either making sure 1.2 is stable, or that we show which branch is the stable version. Sorry for this.