I am working on ROR and incidentally I upgraded my bundles with bundle update
command, I got message that bundles are up to date, but when am trying to start my rails server rails s
it is throwing me an error:
/var/lib/gems/1.9.1/gems/devise-3.2.4/lib/devise/models.rb:88:in `const_get': uninitialized constant Devise::Models::TokenAuthenticatable (NameError)
Please tell me what I have to do to solve this. I have done lots of R&D on this, but not get any answer. I installed rails with sudo apt-get install rails
not RVM. I think there is an option to downgrade rails version with RVM.
please help.
As per this link:
TokenAuthenticatable
has been removed from Devise. So if you are using it in your application, you'll need to remove it.
devise :database_authenticatable, :registerable,
- :recoverable, :rememberable, :token_authenticatable
:token_authenticatable
should be removed.
Refer this link also.
If it works locally it likely means an old gem is being loaded - make sure your gems do not include an old version of devise and in your Gemfile please specify gem 'devise'
only without the version specifically.
Then, for downgrading ruby version, you need to install RVM in your machine,
Please refer the below links to install RVM and different versions of ruby using it. Then, you can use appropriate ruby versions for different projects. No need to downgrade the system installed ruby version. Also, you can use system ruby version if you need. (rvm use system
)
http://rvm.io/rvm/install
https://rvm.io/rubies/installing
http://rvm.io/rvm/basics
Hope it helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With