Moritz Reiter <mo / agrav.org> wrote/schrieb <d1d81a8b82b36ce7f4843e7949c729c0 / ruby-forum.com>:

> Now I want to set the default location of for the config file to
> /home/username/.my_config_file. Therefore I have to get the username
> of the user who is calling the script.

Not necessarily. How about that?:
File.expand_path("~/.my_config_file")
=> /home/username/.my_config_file

Regards
  Thomas