Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined Method `exists?' for class File in Ruby 3.2.0 #15

Open
yann120 opened this issue Dec 27, 2023 · 0 comments
Open

Undefined Method `exists?' for class File in Ruby 3.2.0 #15

yann120 opened this issue Dec 27, 2023 · 0 comments

Comments

@yann120
Copy link

yann120 commented Dec 27, 2023

After upgrading to Ruby 3.2.0, I encountered an error with the shopify-mock gem. Specifically, the method File.exists? used in the gem is no longer available in Ruby 3.2.0, leading to a NoMethodError.

Error Message:
undefined method `exists?' for class File (NoMethodError)

Suggested Fix:
Replace File.exists? with File.exist? which is the correct method name in Ruby 3.2.0.

Steps to Reproduce:
Upgrade Ruby to version 3.2.0.
Use the shopify-mock gem to the last version
Run any operation that invokes the File.exists? method in the gem.
Impact:
This issue prevents the gem from functioning properly with Ruby 3.2.0, which could affect all users who have upgraded to this version of Ruby.

Proposed Solution:
I would like to open a Pull Request to fix this issue by replacing all instances of File.exists? with File.exist? in the gem's codebase.

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

No branches or pull requests

1 participant