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

Solidus breaking with Rails 5.2.2 #2989

Closed
aitbw opened this issue Dec 5, 2018 · 14 comments
Closed

Solidus breaking with Rails 5.2.2 #2989

aitbw opened this issue Dec 5, 2018 · 14 comments
Labels
confirmed Validated report type:bug Error, flaw or fault

Comments

@aitbw
Copy link
Contributor

aitbw commented Dec 5, 2018

Steps to reproduce

  • Run bundle exec rake sandbox on your Solidus source folder

Expected behavior

  • Sandbox app should be created

Actual behavior

  • Rake task to create sandbox app crashes with the following error:
rake aborted!
NameError: undefined method `apply_free_shipping_promotions' for class `#<Class>'

A "workaround" is available by commenting this line but doing so raises two (2) more errors:

rake aborted!
NameError: undefined method `Spree::Store.by_url is DEPRECATED' for class `#<Class>'

and

rake aborted!
ActiveRecord::RecordNotFound: Couldn't find Spree::Zone

System configuration

Extensions in use:

  • solidus_auth_devise
@jacobherrington
Copy link
Contributor

Most likely related to #2978

@aitbw
Copy link
Contributor Author

aitbw commented Dec 5, 2018

@jacobherrington Maybe but I doubt it; the issue presented in #2978 failed from time to time (I'm assuming that's because of some random value being taken into consideration when seeding the database) while this one always fails.

@kennyadsl
Copy link
Member

Could it be something related to the last Rails release happened yesterday?

@aitbw
Copy link
Contributor Author

aitbw commented Dec 5, 2018

I thought so too @kennyadsl; maybe this one is more related to #2987?

@kennyadsl
Copy link
Member

I don’t think it’s related since Ransack released a version that should fix that issue a couple of hours ago.

@jacobherrington
Copy link
Contributor

@aitbw I see this now, I thought this was intermittent. This failure is new.

@jacobherrington jacobherrington added type:bug Error, flaw or fault confirmed Validated report labels Dec 5, 2018
@kennyadsl kennyadsl changed the title Unable to create sandbox app undefined method `apply_free_shipping_promotions' Dec 6, 2018
@kennyadsl
Copy link
Member

I think it's related to some ActiveSupport deprecation change in latest Rails. I'd lock Rails support to 5.2.1 for now until we know what's going on.

kennyadsl added a commit to nebulab/solidus that referenced this issue Dec 6, 2018
There are incompatibilities between core code and Rails 5.2.2
that we need to investigate better.

Locking Rails to 5.2.1 should allow us to have all the ecosystem
working in the meantime, for example this should immediately fix:

- extensions tests against master
- sandbox
- heroku demo

ref solidusio#2989
@tvdeyen
Copy link
Member

tvdeyen commented Dec 6, 2018

It seems like ActiveSupport::Deprecation now checks if the deprecated method actually exist, what it does not in this case.

Adding a simple alias_method :apply_free_shipping_promotions, :apply_shipping_promotions should do the trick.

@kennyadsl
Copy link
Member

👍 where did you find that? I couldn't find any info about that in the ActiveSupport changelog

@kennyadsl
Copy link
Member

Also, I don't think it's the only place where we are using deprecate like that.

@tvdeyen
Copy link
Member

tvdeyen commented Dec 6, 2018

where did you find that? I couldn't find any info about that in the ActiveSupport changelog

Just my gut feeling 😊

@tvdeyen
Copy link
Member

tvdeyen commented Dec 6, 2018

Even with that alias added I get lots of strange method missing errors. Seems like something big (autoloading?) is screwed up in Rails 5.2.2 👎

@kennyadsl
Copy link
Member

kennyadsl commented Dec 6, 2018

I think it's related to this commit: rails/rails@015477a (related to rails/rails@a982a42)

@kennyadsl kennyadsl changed the title undefined method `apply_free_shipping_promotions' Solidus breaking with Rails 5.2.2 Dec 6, 2018
@aitbw
Copy link
Contributor Author

aitbw commented Dec 7, 2018

Closing via #2992

@aitbw aitbw closed this as completed Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Validated report type:bug Error, flaw or fault
Projects
None yet
Development

No branches or pull requests

4 participants