Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
416 stars 125 forks source link

[Bug]: Shopify theme dev cannot find ruby gems #3849

Closed mikelyons closed 2 months ago

mikelyons commented 5 months ago

Please confirm that you have:

In which of these areas are you experiencing a problem?

Theme

Expected behavior

The theme should upload and run in development mode

Actual behavior

Error:

Could not find bugsnag-6.24.2, listen-3.7.1, concurrent-ruby-1.1.10, rb-fsevent-0.11.1, rb-inotify-0.10.1, ffi-1.15.4 in locally installed gems
Run `bundle install` to install missing gems.

bundle install produces error could not locate Gemfile

Verbose output

2024-05-04T04:34:01.846Z: Running command theme dev
2024-05-04T04:34:01.885Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2024-05-04T04:34:01.887Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store mirai-c0ec.myshopify.com:
[]

2024-05-04T04:34:01.889Z: Getting session store...
2024-05-04T04:34:01.892Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "mirai-c0ec.myshopify.com"
  }
}

2024-05-04T04:34:01.896Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-05-04T04:34:01.897Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspectionWith request headers:
 - User-Agent: Shopify CLI; v=3.59.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

2024-05-04T04:34:02.159Z: Request to https://accounts.shopify.com/oauth/introspection completed in 247 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"d60726201d70992dd85a6214b542fb6e"
 - x-request-id: 623b25de-99a4-4ebb-9aa0-c76e9167d158-1714797234

2024-05-04T04:34:02.165Z: The identity token is valid: true
2024-05-04T04:34:02.166Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2024-05-04T04:34:02.167Z: The current session is valid but needs refresh. Refreshing...
2024-05-04T04:34:02.169Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQItPTWsQYQ1KzXsQZSJggBEhDIBPyy7XJKFLR2tqiXPSF0GhDcw9F8df1HVKS1bihR_uPMEkARCWyE4kIscBPDPABKPJzDVDqPnaGMaoYCjUALb4bRW-H0o5kRhHY89zkfzV68hdFEHf37hzb_N_SBUhOuGfEM&refresh_token=atkn_CiEItPTWsQYQtI71sgaiARIKENzD0Xx1_UdUpLVuKFH-48wSQPHbC_SiIePus41dES_3ceD24wCpGZY-xK5C01e3O72043dL2KvheB_NQsxx2ZLvOFLwaWYwumZQORSG4mP3aAU&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3
With request headers:
 - User-Agent: Shopify CLI; v=3.59.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

2024-05-04T04:34:02.495Z: Request to https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQItPTWsQYQ1KzXsQZSJggBEhDIBPyy7XJKFLR2tqiXPSF0GhDcw9F8df1HVKS1bihR_uPMEkARCWyE4kIscBPDPABKPJzDVDqPnaGMaoYCjUALb4bRW-H0o5kRhHY89zkfzV68hdFEHf37hzb_N_SBUhOuGfEM&refresh_token=atkn_CiEItPTWsQYQtI71sgaiARIKENzD0Xx1_UdUpLVuKFH-48wSQPHbC_SiIePus41dES_3ceD24wCpGZY-xK5C01e3O72043dL2KvheB_NQsxx2ZLvOFLwaWYwumZQORSG4mP3aAU&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3 completed in 323 ms       
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"008641c52874e6a1a657a17fedce4c1d"
 - x-request-id: 0c85c501-ca12-494d-92ca-b2a2c35e328f-1714797234

2024-05-04T04:34:02.502Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.59.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

2024-05-04T04:34:02.504Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=****    
With request headers:
 - User-Agent: Shopify CLI; v=3.59.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

2024-05-04T04:34:02.507Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.59.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

2024-05-04T04:34:02.509Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Fmirai-c0ec.myshopify.com%2Fadmin
With request headers:
 - User-Agent: Shopify CLI; v=3.59.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

2024-05-04T04:34:02.750Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=**** completed in 236 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"9dfb442c6f17ba1dd79d5c1ca80fa906"
 - x-request-id: 441da4ad-ba83-4625-ae0a-d98b8f6ba920-1714797234

2024-05-04T04:34:02.755Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=**** completed in 241 ms 
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"755cadf7ae0078d07a6aa996135f5059"
 - x-request-id: 7c1f53d0-95ca-4d42-bfaa-d56d3d12a401-1714797234

2024-05-04T04:34:02.783Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Fmirai-c0ec.myshopify.com%2Fadmin completed in 266 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"4b8993f2aa9ac8a0b7b96080f1dfc840"
 - x-request-id: cc11a195-a170-4ae1-b81e-b4006e994e1e-1714797234

2024-05-04T04:34:02.788Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=**** completed in 272 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"53c218a970d14e557814fb53d674d0d2"
 - x-request-id: df55b29a-686a-4cb3-86c2-4453e96500b9-1714797234

2024-05-04T04:34:02.794Z: Setting session store...
2024-05-04T04:34:02.819Z: Ensuring that the user is authenticated with the Storefront API with the following scopes:
[]

2024-05-04T04:34:02.820Z: Getting session store...
2024-05-04T04:34:02.822Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "storefrontRendererApi": {
    "scopes": []
  }
}

2024-05-04T04:34:02.826Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-05-04T04:34:02.827Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspectionWith request headers:
 - User-Agent: Shopify CLI; v=3.59.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

2024-05-04T04:34:03.052Z: Request to https://accounts.shopify.com/oauth/introspection completed in 222 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"c9b3c42e98955c320b0ef01354e99236"
 - x-request-id: 296cf737-bffb-41c5-a662-8f67cfab7b57-1714797235

2024-05-04T04:34:03.055Z: The identity token is valid: true
2024-05-04T04:34:03.056Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2024-05-04T04:34:03.115Z: 
Running system process:
  · Command: ruby -v
  · Working directory: /mnt/c/Users/Mike/Dev/shopify/testing/harmonious-appearance-theme

2024-05-04T04:34:03.401Z: 
Running system process:
  · Command: bundle -v
  · Working directory: /mnt/c/Users/Mike/Dev/shopify/testing/harmonious-appearance-theme

2024-05-04T04:34:03.853Z: Reading the content of file at /home/mikelyons/.nvm/versions/node/v20.11.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/Gemfile...
2024-05-04T04:34:03.897Z: 
Running system process:
  · Command: bundle install
  · Working directory: /home/mikelyons/.nvm/versions/node/v20.11.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby

2024-05-04T04:34:04.708Z: 
Running system process:
  · Command: bundle exec ruby /home/mikelyons/.nvm/versions/node/v20.11.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify theme token --admin atkn_Cp8DCLL11rEGENKt17EGYpADCAESEBHpQ41Zwk-2houeVRWnKOcaqAFodHRwczovL2FwaS5zaG9waWZ5LmNvbS9hdXRoL3BhcnRuZXJzLmNvbGxhYm9yYXRvci1yZWxhdGlvbnNoaXBzLnJlYWRvbmx5IGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi5ncmFwaHFsIGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi50aGVtZXMgDSinUzIQHZictpQ1SLybYA1LlhKObzokZWFhMzFlOTMtOGM0Ny00NGM0LTliM2EtZTYzZTIyMTFkMDdiQgdBY2NvdW50ShAESf1VwGxGhKddERbpBvyIUlN7InN1YiI6ImZiZGIyNjQ5LWUzMjctNDkwNy04ZjY3LTkwOGQyNGNmZDdlMyIsImlzcyI6Imh0dHBzOi8vYWNjb3VudHMuc2hvcGlmeS5jb20ifWIQjpc4jBCnQve4REAsV4wLOWoQfi_sPxohSmuMlBL-jQB6ehJABR93cK6KREp8PSNY-qtdNEB1DZd6zeGxadpj-pX__Ot6ghVx41yZN6F5BV3_1jtFM3m87I6SB2tSqAvTxzfoCw --sfr atkn_CqMCCLL11rEGENKt17EGYpQCCAESEFOntjxdOknQrf9pFEVhTLUaPmh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5zdG9yZWZyb250LXJlbmRlcmVyLmRldnRvb2xzINhSKKdTOiRlYWEzMWU5My04YzQ3LTQ0YzQtOWIzYS1lNjNlMjIxMWQwN2JCB0FjY291bnRKEARJ_VXAbEaEp10RFukG_IhSU3sic3ViIjoiZmJkYjI2NDktZTMyNy00OTA3LThmNjctOTA4ZDI0Y2ZkN2UzIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5zaG9waWZ5LmNvbSJ9YhCOlziMEKdC97hEQCxXjAs5ahB-L-w_GiFKa4yUEv6NAHp6EkDNqdaNJIMlJAP1WnnSVruAABVfmJPkDiyQSn_1c4HwLEM4GRbljBIGdUeFRUJjipwrqJRbsUk3wzdRvnOrUuEO
  · Working directory: /mnt/c/Users/Mike/Dev/shopify/testing/harmonious-appearance-theme

Could not find bugsnag-6.24.2, listen-3.7.1, concurrent-ruby-1.1.10, rb-fsevent-0.11.1, rb-inotify-0.10.1, ffi-1.15.4 in locally installed gems
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/definition.rb:514:in `materialize'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/definition.rb:199:in `specs'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/definition.rb:255:in `specs_for'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/runtime.rb:18:in `setup'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler.rb:163:in `setup'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/setup.rb:10:in `block in <top (required)>'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/ui/shell.rb:136:in `with_level'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/ui/shell.rb:88:in `silence'
/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.3.20/lib/bundler/setup.rb:10:in `<top (required)>'
<internal:/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
<internal:/home/mikelyons/.rbenv/versions/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
Run `bundle install` to install missing gems.


### Reproduction steps

1. install shopify cli
2. `shopify theme init`
3. `cd <theme-directory-name>
4. `shopify theme dev`

### Operating System

Windows 10

### Shopify CLI version (check your project's `package.json` if you're not sure)

v3.59.2

### Shell

debian wsl2 bash

### Node version (run `node -v` if you're not sure)

v20.11.0

### What language and version are you using in your application?

Ruby 3.3.0
mgmanzella commented 4 months ago

hi @mikelyons thanks for reporting this issue and for your patience 🙏 this is probably an issue related to install, specifically around the CLI ruby dependency. we're actively working to remove this dependency. what were your install steps?? have you recently installed the CLI

as a workaround the best way to mitigate at the moment is a clean install. so:

github-actions[bot] commented 2 months ago

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

lukeh-shopify commented 2 months ago

👋🏻 Hey @mikelyons , because there hasn’t been activity in the last couple of weeks we’ll be closing this issue. However if you’re still experiencing the same problem, please reopen the issue and share the outstanding context we’ve requested. Thanks!