Bug 1215637 - EditUserDialog: undefined method `exists?' for Dir:Class
Summary: EditUserDialog: undefined method `exists?' for Dir:Class
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-23 20:12 UTC by Christopher Yeleighton
Modified: 2023-09-26 10:35 UTC (History)
0 users

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2023-09-23 20:12:44 UTC
> Internal error. Please report a bug report with logs.
> Run save_y2logs to get complete logs.
> 
> Caller: /usr/share/YaST2/include/users/dialogs.rb:1329:in `EditUserDialog'
> 
> Details: undefined method `exists?' for Dir:Class

This is what happens when I tell user editor to open the chooser for the home directory.
Note that choosing SAMBA shares does not crash.
Comment 1 Stefan Hundhammer 2023-09-25 07:34:27 UTC
IIRC there was a change in recent Ruby versions where 'Dir.exists?' was deprecated and now possibly removed. Ruby insists on their slightly broken English with 'xy.exist?', and now they removed that compatibility version IIRC.

Samba shares might be different in that they might not be mounted at that time (relying on the automounter).

I'll have a look.
Comment 2 Stefan Hundhammer 2023-09-25 12:26:05 UTC
https://rubyreferences.github.io/rubychanges/3.2.html#removals

"Removals

Methods:

Dir.exists?, File.exists? 
(deprecated since 2.1 as a general rule of having 
“bare verb” as a method name)"
Comment 3 Stefan Hundhammer 2023-09-25 12:32:36 UTC
Confirmed on TW which now uses Ruby 3.2.2.
Comment 4 Stefan Hundhammer 2023-09-25 12:45:51 UTC
Fix:

https://github.com/yast/yast-users/pull/391

This will arrive in Factory / TW as yast2-users-5.0.1.
Comment 5 OBSbugzilla Bot 2023-09-26 10:35:20 UTC
This is an autogenerated message for OBS integration:
This bug (1215637) was mentioned in
https://build.opensuse.org/request/show/1113640 Factory / yast2-users