Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How To Properly Remove Gem #398

Open
carltonsmith opened this issue Oct 26, 2017 · 6 comments
Open

How To Properly Remove Gem #398

carltonsmith opened this issue Oct 26, 2017 · 6 comments

Comments

@carltonsmith
Copy link

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.

@kinduff
Copy link

kinduff commented Oct 27, 2017

Can you post the error log when you try to start your application when the gem is not present in your Gemfile?

@bbonislawski
Copy link
Contributor

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

@carltonsmith
Copy link
Author

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)>'

@carltonsmith
Copy link
Author

I did not remove those things, but I will give that a try

@carltonsmith
Copy link
Author

@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.

@kinduff
Copy link

kinduff commented Oct 27, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants