shopify-api-ruby: undefined method `construct_api_path' for nil:NilClass

I upgraded from shopify_api v6.0.0 to v7.0.1 5 days ago, while upgrading from Rails v5.2 to v6.0.0.rc1 5 days ago and just noticed this issue (if the cause is around the update).

When I run: ShopifyAPI::Product.all

I am immediately met with this error:

NoMethodError: undefined method `construct_api_path' for nil:NilClass
from /Users/michaelnwani/.rvm/gems/ruby-2.6.2/gems/shopify_api-7.0.1/lib/shopify_api/resources/base.rb:84:in `prefix'

Downgrading back to v6.0.0 fixes the issue.

Thoughts?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 7
  • Comments: 15 (1 by maintainers)

Most upvoted comments

This can be fixed in shopify_cli gem by adding the versioning to the connection in method site_from_config(config)

ShopifyAPI::Base.api_version = '2019-04'