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

Compatibility with Ruby 3.0 #86

Open
vascosantos opened this issue Feb 17, 2021 · 1 comment
Open

Compatibility with Ruby 3.0 #86

vascosantos opened this issue Feb 17, 2021 · 1 comment

Comments

@vascosantos
Copy link

Upgrading to Ruby 3.0 and Spree 4.2.0.rc5 and getting this:

/Users/vasco/.rvm/gems/ruby-3.0.0/gems/activerecord-6.1.2.1/lib/active_record/associations.rb:1457:in `has_many': wrong number of arguments (given 3, expected 1..2) (ArgumentError)
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-globalize-1.0.0.alpha3/lib/friendly_id/history.rb:73:in `block in included'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-globalize-1.0.0.alpha3/lib/friendly_id/history.rb:72:in `class_eval'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-globalize-1.0.0.alpha3/lib/friendly_id/history.rb:72:in `included'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-5.4.2/lib/friendly_id/configuration.rb:57:in `include'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-5.4.2/lib/friendly_id/configuration.rb:57:in `block in use'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-5.4.2/lib/friendly_id/configuration.rb:54:in `map'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-5.4.2/lib/friendly_id/configuration.rb:54:in `use'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/friendly_id-5.4.2/lib/friendly_id/base.rb:210:in `friendly_id'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_core-4.2.0.rc5/app/models/spree/product.rb:26:in `<class:Product>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_core-4.2.0.rc5/app/models/spree/product.rb:22:in `<module:Spree>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_core-4.2.0.rc5/app/models/spree/product.rb:21:in `<main>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/inflector/methods.rb:288:in `const_get'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/inflector/methods.rb:288:in `block in constantize'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/inflector/methods.rb:284:in `each'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/inflector/methods.rb:284:in `inject'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/inflector/methods.rb:284:in `constantize'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_backend-4.2.0.rc5/app/controllers/spree/admin/resource_controller.rb:100:in `belongs_to'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_backend-4.2.0.rc5/app/controllers/spree/admin/product_properties_controller.rb:4:in `<class:ProductPropertiesController>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_backend-4.2.0.rc5/app/controllers/spree/admin/product_properties_controller.rb:3:in `<module:Admin>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_backend-4.2.0.rc5/app/controllers/spree/admin/product_properties_controller.rb:2:in `<module:Spree>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spree_backend-4.2.0.rc5/app/controllers/spree/admin/product_properties_controller.rb:1:in `<main>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/bundler/gems/spree_globalize-aa011eaaff7d/app/controllers/spree/admin/product_properties_controller_decorator.rb:22:in `<main>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/bundler/gems/spree_globalize-aa011eaaff7d/app/controllers/spree/admin/product_properties_controller_decorator.rb:3:in `<module:Admin>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/bundler/gems/spree_globalize-aa011eaaff7d/app/controllers/spree/admin/product_properties_controller_decorator.rb:2:in `<module:Spree>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/bundler/gems/spree_globalize-aa011eaaff7d/app/controllers/spree/admin/product_properties_controller_decorator.rb:1:in `<main>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/bundler/gems/spree_globalize-aa011eaaff7d/lib/spree_globalize/engine.rb:27:in `block in activate'
	from <internal:dir>:134:in `glob'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/bundler/gems/spree_globalize-aa011eaaff7d/lib/spree_globalize/engine.rb:26:in `activate'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:427:in `instance_exec'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:427:in `block in make_lambda'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:603:in `catch'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:603:in `block in default_terminator'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:199:in `block in halting'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:512:in `block in invoke_before'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:512:in `each'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:512:in `invoke_before'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/callbacks.rb:105:in `run_callbacks'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/reloader.rb:88:in `prepare!'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/railties-6.1.2.1/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:32:in `instance_exec'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:32:in `run'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:347:in `each'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:347:in `call'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
	from /Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:60:in `run_initializers'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/railties-6.1.2.1/lib/rails/application.rb:384:in `initialize!'
	from /Users/vasco/Documents/rails/hello-coffee/config/environment.rb:5:in `<main>'
        from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/dependencies.rb:332:in `block in require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.2.1/lib/active_support/dependencies.rb:332:in `require'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spring-2.1.1/lib/spring/application.rb:106:in `preload'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
	from /Users/vasco/.rvm/gems/ruby-3.0.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
	from <internal:/Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/vasco/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'

Looks like friendly_id-globalize is not compatible with Ruby 3.0?

@JacekRoszak
Copy link

Is there any development with this issue ? I have ruby 3.0.2, Spree 4.3 and the same error.

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

2 participants