Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Undefined local variable or method `solidus_paypal_braintree' #152

Closed
grichardomi opened this issue Feb 9, 2018 · 5 comments
Closed

Undefined local variable or method `solidus_paypal_braintree' #152

grichardomi opened this issue Feb 9, 2018 · 5 comments

Comments

@grichardomi
Copy link

I get the following error, while running this app when navigating to Admin page:

undefined local variable or method `solidus_paypal_braintree' for #<#Class:0x0000555c44c27b80:0x0000555c46c46218>

App is running inside Docker. Does anyone has any idea?

@grichardomi
Copy link
Author

Needed to mount route engine.

@grichardomi
Copy link
Author

Proper route was created: mount SolidusPaypalBraintree::Engine, at: '/solidus_paypal_braintree'

Does anyone know why I'm getting this routing error: uninitialized constant SolidusPaypalBraintree::ConfigurationsController

@grichardomi grichardomi reopened this Feb 9, 2018
@grichardomi
Copy link
Author

Problem is related app not finding backend search path for solidus_paypal_braintree:

ActionView::MissingTemplate in Spree::Admin::Products#edit
Showing /home/solidus/app/views/spree/admin/shared/_tabs.html.erb where line #12 raised:

Missing partial solidus_paypal_braintree/configurations/_admin_tab with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder], :versions=>[]}. Searched in:

  • "/home/solidus/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/letter_opener_web-1.3.3/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/solidus_email_to_friend-1bad562818dd/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_gateway-1.2.0/lib/views/backend"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_gateway-1.2.0/lib/views/frontend"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/solidus_globalize-07d4eaa6d0e5/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/solidus_i18n-67b61b2ca4aa/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/solidus_static_content-22c6cc9c4acd/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_comments-1.0.1/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/solidus_reviews-2b0912ab7010/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/solidus_editor-f8aa14edce68/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/ckeditor-32bc0c670238/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_auth_devise-2.1.0/lib/views/backend"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_auth_devise-2.1.0/lib/views/frontend"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/devise-4.4.1/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_frontend-2.4.2/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_backend-2.4.2/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_api-2.4.2/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/bundler/gems/solidus_paypal_braintree-898eb2cad543/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/solidus_core-2.4.2/app/views"
  • "/home/solidus/vendor/bundle/ruby/2.5.0/gems/kaminari-core-1.1.1/app/views"

@luukveenis
Copy link
Contributor

From the stack trace it looks like the /lib/views/backend directory is not being added to your paths here:
https://github.com/solidusio/solidus_paypal_braintree/blob/master/lib/solidus_paypal_braintree/engine.rb#L51

Are you using solidus_backend? What version of Solidus are you on?

I would investigate a little further and see why SolidusSupport.backend_available? is return false (presumably).

@grichardomi
Copy link
Author

grichardomi commented Feb 10, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants