Q:

Devise wrong number of arguments (2 for 1)

Existing issue  There is an existing question and I am getting the exact error after upgrading to rails 4.2.0.
The above issue was a conflict between devise and clearance but I am not using clearance. I suspect that some of my gem is causing the problem.
Here is my code:
gemfile

source 'https://rubygems.org'

gem 'rails', '4.2.0'
gem 'sass-rails', '~> 4.0.0'
gem "figaro"
gem 'nokogiri'

gem 'bootstrap-editable-rails'
gem 'devise'
gem 'devise_token_auth' 
gem 'devise_invitable', '~> 1.3.3'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'redis'
gem 'switch_user', '0.9.4'
gem 'websocket-rails', '0.6.2'
gem 'twilio-ruby', '~> 3.11'

gem 'aasm'
gem 'acts_as_tenant'
gem 'activerecord-postgresql-adapter'
gem 'annotate', '>=2.6.0'
gem 'chronic_duration'
gem 'attribute-defaults'
gem 'groupdate'
gem 'hairtrigger'
gem 'money-rails'
gem 'nilify_blanks'
gem 'pacecar'
gem 'paranoid2'
gem 'schema_plus'
gem 'time_ago_in_words'
gem 'validates_timeliness', '~> 3.0'
gem 'spreadsheet'

gem 'client_side_validations', github: 'DavyJonesLocker/client_side_validations'
gem 'client_side_validations-simple_form', github: 'DavyJonesLocker/client_side_validations-simple_form'
gem 'kaminari'
gem 'rails-timeago', '~> 2.0'
gem 'simple_form'
gem 'slim-rails'
gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails', :branch => :bootstrap3
gem 'jquery-datatables-rails', '~> 2.2.3'
gem 'jquery-turbolinks'
gem 'twitter-bootstrap-calendar'

gem 'dust-rails', '0.4.0'
gem 'coffee-rails'
gem 'execjs'
gem 'gon'
gem 'jbuilder', '~> 1.2'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'less-rails'
gem 'remotipart', '~> 1.2'
gem 'therubyracer', platforms: :ruby
gem 'twitter-bootstrap-rails-confirm', github: 'bluerail/twitter-bootstrap-rails-confirm', branch: 'bootstrap3'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'

gem 'paperclip', '~> 3.5.0'

gem 'sidekiq'
gem 'sinatra', '>= 1.3.0', :require => nil
gem 'whenever', :require => false

gem 'liquid'

group :doc do
  gem 'sdoc', require: false
end

group :development do
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'capistrano', '~> 3.1'
  gem 'capistrano-rails', '~> 1.1'
  gem 'capistrano-ext'
  gem 'capistrano-rvm'
  gem 'capistrano-bundler'
  gem 'letter_opener'
  gem 'quiet_assets'
  gem 'pry', '~> 0.10.0'
  gem 'brakeman', :require => false
  gem 'meta_request'
end

group :test do
  gem 'email_spec'
  gem 'minitest'
end

A:

First of all remove devise from your application . 
Then do a bundle install .
And finally again , install devise . 
This will work . 

