Solidus: Solidus breaking with Rails 5.2.2

Created on 5 Dec 2018  路  14Comments  路  Source: solidusio/solidus

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

  • Latest master revision (7a33685)

Extensions in use:

  • solidus_auth_devise
Bug Confirmed

Most helpful comment

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

Just my gut feeling 馃槉

All 14 comments

Most likely related to #2978

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

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

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

I don鈥檛 think it鈥檚 related since Ransack released a version that should fix that issue a couple of hours ago.

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

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.

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.

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

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

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

Just my gut feeling 馃槉

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 馃憥

I think it's related to this commit: https://github.com/rails/rails/commit/015477ae9109d4105d5a5057d82338f198febb74 (related to https://github.com/rails/rails/commit/a982a42d766169c2170d7f100c2a5ceb5430efb1)

Closing via #2992

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tudorpavel picture tudorpavel  路  3Comments

cdrage picture cdrage  路  3Comments

kennyadsl picture kennyadsl  路  3Comments

spaghetticode picture spaghetticode  路  3Comments

jhawthorn picture jhawthorn  路  5Comments