Git Product home page Git Product logo

solidus_affirm_v2's People

Contributors

cpfergus1 avatar kennyadsl avatar peterberkenbosch avatar waiting-for-dev avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

solidus_affirm_v2's Issues

uninitialized constant SolidusAffirmV2::PaymentMethod (NameError)

I upgraded my rails app from 6.1 to 7.0 and now I am getting this error. I edited the engine.rb file locally using bundle open command and it worked fine. This is my edited file:
`# frozen_string_literal: true

require 'spree/core'
require 'solidus_affirm_v2'

module SolidusAffirmV2
class Engine < Rails::Engine
include SolidusSupport::EngineExtensions

isolate_namespace ::Spree

engine_name 'solidus_affirm_v2'
config.autoload_once_paths << "#{root}/app/helpers"

# use rspec for tests
config.generators do |g|
  g.test_framework :rspec
end

initializer "register_solidus_affirm_v2_payment_method", after: "spree.register.payment_methods" do |app|
  config.to_prepare do
    app.config.spree.payment_methods << SolidusAffirmV2::PaymentMethod
  end
end

initializer "register_solidus_affirm_v2_configuration", before: :load_config_initializers do |_app|
  config.to_prepare do
    SolidusAffirmV2::Config = SolidusAffirmV2::Configuration.new
  end
end

initializer 'register_solidus_affirm_v2_helper_action_controller' do |_app|
  ActiveSupport.on_load :action_controller do |klass|
    next if klass.name == "ActionController::API"

     helper SolidusAffirmV2::AffirmHelper
          end
end

end
end
`

Traceback (most recent call last): 50: from bin/rails:4:in

'
49: from /home/dev/.rvm/gems/ruby-2.7.8/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' 48: from /home/dev/.rvm/gems/ruby-2.7.8/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require'
47: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/commands.rb:18:in <main>' 46: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/command.rb:48:in invoke'
45: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/command/base.rb:87:in perform' 44: from /home/dev/.rvm/gems/ruby-2.7.8/gems/thor-1.3.0/lib/thor.rb:527:in dispatch'
43: from /home/dev/.rvm/gems/ruby-2.7.8/gems/thor-1.3.0/lib/thor/invocation.rb:127:in invoke_command' 42: from /home/dev/.rvm/gems/ruby-2.7.8/gems/thor-1.3.0/lib/thor/command.rb:28:in run'
41: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/commands/server/server_command.rb:134:in perform' 40: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/commands/server/server_command.rb:134:in tap'
39: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/commands/server/server_command.rb:143:in block in perform' 38: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/commands/server/server_command.rb:36:in start'
37: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/commands/server/server_command.rb:76:in log_to_stdout' 36: from /home/dev/.rvm/gems/ruby-2.7.8/gems/rack-2.2.8/lib/rack/server.rb:422:in wrapped_app'
35: from /home/dev/.rvm/gems/ruby-2.7.8/gems/rack-2.2.8/lib/rack/server.rb:249:in app' 34: from /home/dev/.rvm/gems/ruby-2.7.8/gems/rack-2.2.8/lib/rack/server.rb:349:in build_app_and_options_from_config'
33: from /home/dev/.rvm/gems/ruby-2.7.8/gems/rack-2.2.8/lib/rack/builder.rb:66:in parse_file' 32: from /home/dev/.rvm/gems/ruby-2.7.8/gems/rack-2.2.8/lib/rack/builder.rb:105:in load_file'
31: from /home/dev/.rvm/gems/ruby-2.7.8/gems/rack-2.2.8/lib/rack/builder.rb:116:in new_from_string' 30: from /home/dev/.rvm/gems/ruby-2.7.8/gems/rack-2.2.8/lib/rack/builder.rb:116:in eval'
29: from config.ru:3:in block in <main>' 28: from config.ru:3:in require_relative'
27: from /home/dev/Documents/sample-store/config/environment.rb:5:in <main>' 26: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/application.rb:372:in initialize!'
25: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:60:in run_initializers' 24: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:205:in tsort_each'
23: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:226:in tsort_each' 22: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:347:in each_strongly_connected_component'
21: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:347:in call' 20: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:347:in each'
19: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:349:in block in each_strongly_connected_component' 18: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:415:in each_strongly_connected_component_from'
17: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:415:in call' 16: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:50:in tsort_each_child'
15: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:50:in each' 14: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:421:in block in each_strongly_connected_component_from'
13: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:415:in each_strongly_connected_component_from' 12: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:415:in call'
11: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:50:in tsort_each_child' 10: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:50:in each'
9: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:421:in block in each_strongly_connected_component_from' 8: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:431:in each_strongly_connected_component_from'
7: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' 6: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from'
5: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 4: from /home/dev/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/tsort.rb:228:in block in tsort_each'
3: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:61:in block in run_initializers' 2: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:32:in run'
1: from /home/dev/.rvm/gems/ruby-2.7.8/gems/railties-7.0.2/lib/rails/initializable.rb:32:in instance_exec' /home/dev/.rvm/gems/ruby-2.7.8/bundler/gems/solidus_affirm_v2-e14eac886ea2/lib/solidus_affirm_v2/engine.rb:20:in block in class:Engine': uninitialized constant SolidusAffirmV2::PaymentMethod (NameError)`

Add Backwards compatibility with solidus_affirm

Ideally this extension is a drop-in replacement for solidus_affirm, removing solidus_affirm from existing stores is causing some issues with existing orders etc.

This issue probably needs to be split up into a couple of smaller issues and pull requests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.