spree-contrib / spree_multi_vendor

Spree marketplace extension. Create your own marketplace on top of Spree Commerce
https://spreecommerce.org/marketplace-ecommerce/
BSD 3-Clause "New" or "Revised" License
142 stars 135 forks source link

installation error #149

Closed abom closed 3 years ago

abom commented 4 years ago

When doing:

bundle exec rails g spree_multi_vendor:install

I got the following error:

/var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:284:in `const_get': uninitialized constant Spree::User (NameError)                                                                                                                                                 
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:284:in `block in constantize'                    
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:280:in `each'                                    
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:280:in `inject'                                  
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:280:in `constantize'                             
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/core_ext/string/inflections.rb:68:in `constantize'                    
        from /var/lib/gems/2.7.0/gems/spree_core-4.1.12/lib/spree/core.rb:28:in `user_class'                                                         
        from /var/lib/gems/2.7.0/gems/spree_core-4.1.12/app/models/spree/order.rb:64:in `<class:Order>'                                              
        from /var/lib/gems/2.7.0/gems/spree_core-4.1.12/app/models/spree/order.rb:7:in `<module:Spree>'                                              
        from /var/lib/gems/2.7.0/gems/spree_core-4.1.12/app/models/spree/order.rb:6:in `<main>'                                                      
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'                         
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_l$i'                                                                                                                                                   
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'                          
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'       
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'                         
        from /var/lib/gems/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'                                                                 
        from /var/lib/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
        from /var/lib/gems/2.7.0/gems/spree_gateway-3.9.2/app/models/spree/apple_pay_order_decorator.rb:20:in `<main>'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_l$i'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        from /var/lib/gems/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /var/lib/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
        from /var/lib/gems/2.7.0/gems/spree_gateway-3.9.2/app/models/spree/apple_pay_order_decorator.rb:2:in `<module:Spree>'
        from /var/lib/gems/2.7.0/gems/spree_gateway-3.9.2/app/models/spree/apple_pay_order_decorator.rb:1:in `<main>'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
        from /var/lib/gems/2.7.0/gems/spree_gateway-3.9.2/lib/spree_gateway/engine.rb:42:in `block in activate'
        from /var/lib/gems/2.7.0/gems/spree_gateway-3.9.2/lib/spree_gateway/engine.rb:41:in `glob'
       from /var/lib/gems/2.7.0/gems/spree_gateway-3.9.2/lib/spree_gateway/engine.rb:41:in `activate'                                  [16/13091]
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:428:in `instance_exec'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:428:in `block in make_lambda'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:200:in `block (2 levels) in halting'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:605:in `block (2 levels) in default_terminator'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:604:in `catch'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:604:in `block in default_terminator'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:201:in `block in halting'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:513:in `block in invoke_before'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:513:in `each'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:513:in `invoke_before'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:134:in `run_callbacks'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/reloader.rb:88:in `prepare!'
        from /var/lib/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/application/finisher.rb:113:in `block in <module:Finisher>'
        from /var/lib/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:32:in `instance_exec'
        from /var/lib/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:32:in `run'
        from /var/lib/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:61:in `block in run_initializers'
        from /usr/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
        from /usr/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/lib/ruby/2.7.0/tsort.rb:347:in `each'
        from /usr/lib/ruby/2.7.0/tsort.rb:347:in `call'
        from /usr/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
        from /usr/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
        from /var/lib/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:60:in `run_initializers'
        from /var/lib/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/application.rb:363:in `initialize!'
        from /root/custom_spree/config/environment.rb:5:in `<main>'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from /var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        from /var/lib/gems/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /var/lib/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
        from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
        from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:106:in `preload'
        from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
        from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
        from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
        from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
        from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        from -e:1:in `<main>'

Ruby and rails versions (ubuntu 20.04):

$ ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
$ gem --version
3.1.2
abom commented 4 years ago

Spree gems added to Gemfile:

gem 'spree', '~> 4.1'
gem 'spree_gateway', '~> 3.9'
gem 'spree_i18n', github: 'spree-contrib/spree_i18n'
gem 'spree_globalize', github: 'spree-contrib/spree_globalize'
gem 'spree_multi_vendor', github: 'spree-contrib/spree_multi_vendor'
przemosk commented 4 years ago

Hey @abom

Thanks for reporting! please tell, did you omit intentionally this gem 'spree_auth_devise', '~> 4.2' (source) from your own Spree setup ?

abom commented 3 years ago

It seems like I removed it by mistake, closing this as it's now working without problems after adding this gem :)

Thanks @przemosk!