spree_auth_devise
spree_auth_devise copied to clipboard
How To Properly Remove Gem
In installing Spree, I was following the instructions and inadvertently installed this gem in the process.
As it happens, my application is using a custom User class, so I don't need this gem. However, when I remove it, my application fails. I have followed the instructions on the Spree site for how to implement a custom user class, but when I remove the spree_auth_devise gem, the site won't launch. When I leave the gem in, the site will launch, but the login/logout links don't work correctly inside Spree. They are using the Spree routes, and not the routes I have defined in my routes.rb.
I need to know how to safely remove this gem from my installation.
Can you post the error log when you try to start your application when the gem is not present in your Gemfile?
Did you remove //= require spree/frontend/spree_auth
from vendor/assets/javascripts/spree/frontend/all.js? and check config/initializers/devise.rb if there is something connected with spree_auth_devise
This is from the error log:
Exiting
/Users/user/sites/site/app/controllers/application_controller.rb:8:in `<class:ApplicationController>': uninitialized constant Spree::AuthenticationHelpers (NameError)
from /Users/user/sites/site/app/controllers/application_controller.rb:1:in `<top (required)>'
I did not remove those things, but I will give that a try
@bbonislawski After removing the ref to spree_auth in the frontend all.js, I tried running assets:precompile and got the same error I posted above. I also checked the devise.rb but the only thing in there is the secret key.
@carltonsmith looks like app/controllers/application_controller.rb is raising an exception for Spree::AuthenticationHelpers, make sure your Spree setup + custom authentication is setup correctly. We can help you out more if you post more code examples about your setup.